forsakenquantum2 karma2020-07-27 19:51:17 UTC
I think the two main things I ran into were 1) if I declared variables at the top level in a script that wasn't wrapped in a module and then tried to change them in a for loop, the changes wouldn't hold after exiting the for loop, and 2) it seemed like I had a similar problem inside a function, where a variable declared outside a for loop couldn't be modified by it. The first one was frustrating but at least I could work around it by wrapping things at the top level in a module, but the second one was confusing as to why it was happening and how to fix it.
View HistoryShare Link
forsakenquantum1 karma2020-07-27 19:01:44 UTC
I'm really excited about the possibilities of Julia and have used it in several projects. I find I end up going back to Python often, though, because I find the scoping rules in Julia to be pretty confusing and difficult to debug when something is wrong. Are you committed to the current way of scoping, and if so, why do you think it's best?
Copyright © 2014 BestofAMA.com, All rights reserved.
reddit has not approved or endorsed BestofAMA, reddit design elements are trademarks of reddit inc.