News for hackers. Stuff that matters.
Re:New features coming in Julia 1.7 by sannee on Tuesday October 05, 2021 @08:25AM (#28758416)
Supporting the LaTeX expansion is just a necessary feature of any Julia-compatible code editor. It is not then particularly more difficult to type `\sigma` over `sigma`.

Also note that other languages often support non-ASCII identifiers as well --- for example, `σ` is a completely valid identifier name in Python (though it is more restrictive than Julia, `σ²` is not valid in Python and yet is valid in Julia). It even works in C, but that might just be a GNU extension.

Re:New features coming in Julia 1.7 by jstx1 on Tuesday October 05, 2021 @09:14AM (#28758943)
It's not just identifiers though, it's also operators. To take an example from the OP article, I can't relate to anyone who claims that ∛x is better than cbrt(x). The fact that this is not only allowed but actively encouraged is absolutely baffling to me.
Re:New features coming in Julia 1.7 by find on Tuesday October 05, 2021 @09:41AM (#28759339)
The language of science is mathematics, so code that more closely resembles mathematical notation can be more efficient for practicing scientists to understand. There's a lot of value in code that looks like the expression published in the paper, because when another scientist wants to build upon or modify that code, they'll read and understand the paper first, not the package code.

Also in physics, sometimes you get really large expressions with a lot of Greek letters and operators. In the paper, you make it a double-wide multiline equation with LaTeX. It makes a big difference if that corresponds to a few lines of Greek symbols in your code, and not twenty.

Re:New features coming in Julia 1.7 by shakow on Tuesday October 05, 2021 @09:47AM (#28759419)
> I can't relate to anyone who claims that ∛x is better than cbrt(x)

I do. It's a simple \cbrt<tab> away in any editor worth their salt, and it greatly improves readability of computation-heavy code – ∛(ϵ² + ξ³) ≤ Φ(π) is much clearer than the ASCII equivalent.

Re:New features coming in Julia 1.7 by maccam912 on Tuesday October 05, 2021 @09:29AM (#28759168)
Eh, I have to diagree on that. A mathematician reading ∛x in code will immediately know what it means, but that isn't necessarily true when seeing cbrt(x). Julia was written for mathematicians, not programmers, and takes some getting used to.
Re:New features coming in Julia 1.7 by jstx1 on Tuesday October 05, 2021 @09:48AM (#28759430)
The mathematician still has to type \cbrt + tab to type the glyph so they have to know the name of the function. Not only that, they have to know the name of the function from reading the Unicode glyph or be constantly pasting characters into the REPL. I don't get how that's more efficient in any way.
Re:New features coming in Julia 1.7 by leephillips on Tuesday October 05, 2021 @10:15AM (#28759770)
We are in the age of Unicode. The LaTeX entry methods are options, not required. I rarely use them, and don’t paste in characters. I hit a modifier key. Typing a Greek letter is no more inconvenient than typing an uppercase letter.