Tips for overloading
- Try not to use up every overloading space you have right away (Unless you're really good at overloading). You should be prepared for adding new overloads to your language.
- Don't overload if vectorization makes sense. Vectoriation is a really common operation. For example, vectorization is the most common 1-byter in both Jelly and Vyxal, and these two are very different languages. This should show how prominent vectorization is in golfing languages.
- For example,
+
should definitely be vectorized, because it makes sense to do so. If you overload it, you end up wasting bytes in codegolf due to an unnecessary use of a vectorization prefix.
- For example,
- Sometimes, it can be hard to track down your overloads, especially if you have a lot of them. So, it can be helpful to make a table of all of your overloads, to see which instructions could be overloaded, which operations are duplicated, etc.
- Another trick when you're designing the language. You can first list every instruction you want to overload (without actually introducing overloads). Then, try to merge all the commands you have into fewer operations (in a way that makes sense to you).
- When you don't know what things to overload in your language, generating a 1-gram corpus of a popular golfing language will lead you to some interesting ideas.