To all noobs like me please read Bogumił Kamiński's blog especially the latest about why he uses main()

Hi all

I would suggest that a LOT my MANY mistakes in julia would have been avoided by reading Bogumił Kamiński’s blog entries. They are FUN, easy to read and informative. This latest one knocks it out of the ball park for me.

hope this helps



If anyone’s wondering why a let block version doesn’t perform as well as a main method call despite both being local scopes, it’s because the compiler only optimizes and caches a method call. After all, a method call can be repeated throughout a script, and the let block cannot (you can rerun a script, but since the script can be edited between runs, it’s doing something new, not being saved).


For those interested, he has a textbook.


All the time-consuming loops and comprehensions should be wrapped into functions. Usually I end up writing many functions instead of just one main() function.

1 Like