This is a fun and stress-free challenge for anyone who wishes to become more familiar with … ERRORS.
In Control Flow · The Julia Language there are 25 exceptions. Your job is to write code that throws all of them. And since this is a golfing challenge, you should try to do so with the least amount of Julia code (counted in bytes). To give everyone a fair and equal testing ground, I have set up a small repository with 25 functions that are tested. There are no rules as to what you are allowed to do, except that all the code that you use must be contained inside the src/ folder. The repository can be cloned from:
I got a score of 587 with a bit of metaprogramming trickery. Feels a bit like cheating, but seems to be explicitely allowed. Thank you for creating this cool challenge!
I think it is more fun to see what kinds of solutions people come up with, rather than try to limit what people are allowed to do, so I explicitly didn’t want to prevent you from using metaprogramming.
However, I do think I would consider a solution that actually calls functions which throws all of the errors in obscure ways more beautiful, even if it has a higher score.