6 ms·
I know its minor, but I still hope they will fix scoping not that my suggestion is good, but what they have now is bad https://github.com/JuliaLang/julia/issu
by systems 6y ago
I know its minor, but I still hope they will fix scoping
not that my suggestion is good, but what they have now is bad
https://github.com/JuliaLang/julia/issues/37187 https://github.com/JuliaLang/julia/issues/37187
- StefanKarpinski 6y agoHas been fixed since 1.5.
- patagurbon 6y agoShould that issue be closed then?
- systems 6y agoIts a suggestion to fix the awkwardness, one that will never get approved "Put your code into functions, people!" .. is the reason why most people dont notice the weird scoping rules You will only hit the weirdness face first, if you write scripts with global variables, which is usually what beginners do Most advanced users, and library writers, probably hardly notice it
- wott 6y ago> Its a suggestion to fix the awkwardness, one that will never get approved You were courageous to even try :-) From their refusal to see any use in explicit variables declarations, their (somewhat related) huge scope debacle, to its strange and irregular 'resolution', not to mention the original absurdly weird propositions they had made to resolve it: the scope and variable declaration subject is pretty hopeless in Julia land. I quickly gave up on it years ago (long before the scope debacle), as I had no intention of losing my time, when I saw the arguments and the logic they used.
- DNF2 6y agoThis is just a disagreement over basic design: should variable declarations be explicit or not. It is a choice, and something that reasonable people can disagree on. Framing this as a case of irrational and illogical behaviour is unnecessary and unreasonable in my opinion. A lot of serious thought and debate went into the resolution. There is no need to disrespect and badmouth people because they have different priorities than you.
- systems 6y agoCan you tell me one design benefit (a real good one) for not declaring variables before their use, in a mutable by default programming language
- DNF2 6y agoI don't have a strong opinion on this, one way or the other. It's less verbose (which I like), and more familiar to those used to dynamic languages like python, matlab, etc. But this isn't my decision, I'm ok with either.
- systems 6y agono it has not, they now have different rules for repl, which is part of scope awkwardness
- socialdemocrat 6y agoSeems like a reasonable trade off to me. The previous behavior was just really annoying in practice.
- systems 6y agoits an exceptional behaviour, its a code smell, good code, should try to make exceptions normal its a very poor design they don't have variable declaration, and they have to go head over heels to provide acceptable behaviour anyway, it is a bad thing in the language, lets not defend it (i hope) julia still have a lot to offer, i guess it can afford one design flaw