Hacker News new | ask | show | jobs
by systems 1907 days 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

1 comments

Has been fixed since 1.5.
no it has not, they now have different rules for repl, which is part of scope awkwardness
Seems like a reasonable trade off to me. The previous behavior was just really annoying in practice.
its 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

Should that issue be closed then?
Its 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

> 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.

This 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.

Can you tell me one design benefit (a real good one) for not declaring variables before their use, in a mutable by default programming language