4 ms·
I wish non-Julia community would adopt this practice, because unicode symbols exist for a reason, and using proper symbols instead of making look every language
by krick 5y ago
I wish non-Julia community would adopt this practice, because unicode symbols exist for a reason, and using proper symbols instead of making look every language like Perl with unix-style abbreviations that look bogus to pretty much everyone but the most seasoned C-programmers. And complaining u and μ are too similar is like complaining 1 and l or 0 and O are similar. I mean, yes, they are, unfortunately, but if you are noticing it's a real problem for you when writing code, you should probably check out better fonts for your text editor.
For the record, I'm not a blackboard addict, I never had a career in academia and I'm not even really a member of Julia community any more than any other person who wrote maybe a couple thousands of LoC in Julia. But I wish people would realize it's not 1970's anymore, and ASCII is culturally outdated. For that matter, I would love if I could write formulas in my code the same way I do on paper, like in that MathJax sample from the article. That's why math notation exists at all, imperfect as it may be (and I hate many things about established math notation, but it's the best we have). I just don't see how it's possible without abandoning plain-text, which I surely wouldn't like because we (currently) don't have tools that would make handling it as effortless, as editing text in Vim.
- bruce343434 5y agoFor that to happens common keyboards need to include these esoteric symbols. Yes, esoteric. Who's in the market for a keyboard with Greek alts? Or do you prefer a space cadet keyboard? What if you already have a US-Arabic keyboard which is fairly common? The fact is it's easier to type "mu" instead of "u" (like right now, I can't be bothered to look up "mu unicode", or open the special characters picker, or exhaustively brute force alt-gr key combos to find the mu). Take it a step further, I wish physicists and mathematicians would stop naming their variables so poorly so that only the most seasoned of their field can follow along. Sometimes, like v (velocity) it's quite obvious, at other times I find myself staring at scripts with insane variables like a,o,t_o, etc. And this is a habbit that seems to carry over to non-academic code as well. It's trivial to spot code written by a mathematician because it tends to be incredibly obfuscated. Do you really need to name your constants K_(single letter)? Or can you just write "AIRDENSITY" once and let your editor autocomplete it in the future? The reason I complain about these symbols is because they don't have clearly defined meaning. Maths/Physics had to pull out the Greek alphabet after it exhausted the Latin alphabet (and overloaded most letters with 2 or more meanings) and then promptly molested the Greek one in the same way. Just look at Omega. It's useless. It has been overloaded with so many possible meanings that it has none. Stop naming your variables "omega". Unlike Maths, programming languages support variable names of more than 1 character long.
- DNF2 5y agoLong variable names make mathematically oriented code unreadable. A short half-liner becomes a multi-line monstrosity. What you need to understand is that in mathematical code, the variables themselves are of secondary importance, while the structure of the expression is primary. With long names, you cannot see what's going on.
- CornCobs 5y agoJulia allows you to input Unicode characters via latex names though. I think that's a sweet spot of ease of typing and expressivity of characters. Honestly I really hate seeing mu_a, delta_k and company all over the place. If we are gonna name our variables like this might as well give us the actual characters
- enriquto 5y ago> making look every language like Perl with unix-style abbreviations your criticism of Perl is unfair. Base perl has supported unicode variable names since more than 20 years ago, way before all the other languages that you speak about.