It should not be a decision by people implementing the language but not all projects using that language.
Rust, Macros, λ-calculus/Church numerals, oh my
51–60 of 82 posts
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#52While it's definitely cute and amusing, this is exactly why languages that specify their source code in non-ascii encodings are a bad idea. Fully 92.6% of working programmers have no idea how to produce a λ or γ on their input device of choice. Maybe a third of those could eventually find it with a character picker tool. Java started this (in the unicode era anyway -- yeah yeah, APL). The community quite sanely rejec…
> I have no idea why it hasn't been killed dead in new designs.
Well there is the use case that someone can't or doesn't want to learn/use english and their native language instead. These people definitely should be able to do that. For me personally, I've arrived at the conclusion that I personally do not want to code in projects in my native tongue. Simply because then a) it's only visible to a limited community and b) I constantly have to translate english concepts/ideas into the native tongue or risk having a half-english/half-german mixup. Other people might arrive at other conclusions, that's their thing and therefore they should be able to code in their native tongue and script.
This "native speakers" question is different from the question of using λ instead of lambda in an otherwise english codebase, or using Chebyshev's cyrillic name vs an ASCII transliteration. And here my opinion is different: some people may benefit from being able to code in their native tongue, but nobody has any benefits from λ or suddenly having a set of cyrillic characters as function name.
If you check the lib.rs of the project, you can see that it opts-in to nightly features. Naming anything λ is not possible in stable Rust right now. This will change though whith a newly merged RFC [1]. Fortunately, great care had been put on preventing homoglyph and mixed script attacks. My biggest issue with the change is that it's not opt-in but some future compiler release will accept non-ascii idents by default. It's easy to see why they arrived at this outcome: the entire thread is full with political ideology. According to the people in the thread, it might make someone feel excluded if they had to put #![allow(non_ascii_idents)] to lib.rs or an analogon to Cargo.toml... Seriously...
The keywords etc. are all in english anyway, an additional #![allow(non_ascii_idents)] can't be such a big issue can it.
I hope, like in java, non-ascii idents in mostly english codebases will get rejected by the Rust community as bad coding style. Fortunately there will be an option at least to forbid non-ascii identifiers without needing additional tooling and I guess I'll enable it in all of my own codebases.
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#53Amazing, 46 comments, all about my choosing to use the correct symbol for the macro. It's not like I choose some super misleading Unicode characters, like for example, how macOS smart quotes might change "foo" into “foo”. Again, technically correct... maybe programming languages should match these kinds of quotes too. But this is all more or less beside the point. I can type `λ!{x.x}` easily, since I have a Greek key…
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#54While it's definitely cute and amusing, this is exactly why languages that specify their source code in non-ascii encodings are a bad idea. Fully 92.6% of working programmers have no idea how to produce a λ or γ on their input device of choice. Maybe a third of those could eventually find it with a character picker tool. Java started this (in the unicode era anyway -- yeah yeah, APL). The community quite sanely rejec…
ASCII is typeable by everyone. I'm german. I know how to type äöüß they are native keys on my keyboard. I know how to type \lambda in LaTex. I don't know how to get the λ key. However, I can type ASCII. A russian knows how to type cyrillic letters, and while very likely also knowing their way around ASCII, probably can't type λ easily either. Like it or not, ASCII is the least common denominator. There is nothing gai…
I generally agree we should all be so fortunate as to be able to read the code put in front of us.
And you clearly know how to type a λ, you did it 6 times in your post.
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#55While it's definitely cute and amusing, this is exactly why languages that specify their source code in non-ascii encodings are a bad idea. Fully 92.6% of working programmers have no idea how to produce a λ or γ on their input device of choice. Maybe a third of those could eventually find it with a character picker tool. Java started this (in the unicode era anyway -- yeah yeah, APL). The community quite sanely rejec…
Also most programmers wouldn't care to implement toy projects on the lambda calculus as part of their job. This is like complaining that most doctors couldn't program their own MRI machine.
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#56Earlier quoted context omitted.
Because people in non-English-speaking countries are perfectly within their rights to name source code entities in their native language instead of either having to mangle words into ASCII representations (possibly even leading to ambiguities in case of near-homonyms that have identical ASCII bastardizations!) or being forced to awkwardly translate domain terminology into English which is a task that may be any of th…
As a non-native-English-speaker, the idea of having invisible bugs in code due to lookalike characters terrifies me. The allowed set of characters would have to be vetted very carefully before I'd consider non-ASCII. Edit: A small taste of what we can expect: https://i.imgur.com/k8S00sM.jpg
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#57Amazing, 46 comments, all about my choosing to use the correct symbol for the macro. It's not like I choose some super misleading Unicode characters, like for example, how macOS smart quotes might change "foo" into “foo”. Again, technically correct... maybe programming languages should match these kinds of quotes too. But this is all more or less beside the point. I can type `λ!{x.x}` easily, since I have a Greek key…
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#58Earlier quoted context omitted.
ASCII is typeable by everyone. I'm german. I know how to type äöüß they are native keys on my keyboard. I know how to type \lambda in LaTex. I don't know how to get the λ key. However, I can type ASCII. A russian knows how to type cyrillic letters, and while very likely also knowing their way around ASCII, probably can't type λ easily either. Like it or not, ASCII is the least common denominator. There is nothing gai…
You don't think λ-calculus deserves the symbol `λ!` in Rust? Anyone who is learning or interested in λ-calculus should be aware of what it means (that's the whole point). I generally agree we should all be so fortunate as to be able to read the code put in front of us. And you clearly know how to type a λ, you did it 6 times in your post.
I copy-pasted it. If there is no source to copy-paste from I'd have to use google. Don't want to be forced to do either in my code.
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#59Amazing, 46 comments, all about my choosing to use the correct symbol for the macro. It's not like I choose some super misleading Unicode characters, like for example, how macOS smart quotes might change "foo" into “foo”. Again, technically correct... maybe programming languages should match these kinds of quotes too. But this is all more or less beside the point. I can type `λ!{x.x}` easily, since I have a Greek key…
I agree, it's nice to use the same symbols you'd use on paper. I did something similar in Scala http://mez.cl/en/lambda-dsl/
Re: Rust, Macros, λ-calculus/Church numerals, oh my
#60Earlier quoted context omitted.
You don't think λ-calculus deserves the symbol `λ!` in Rust? Anyone who is learning or interested in λ-calculus should be aware of what it means (that's the whole point). I generally agree we should all be so fortunate as to be able to read the code put in front of us. And you clearly know how to type a λ, you did it 6 times in your post.
> And you clearly know how to type a λ I copy-pasted it. If there is no source to copy-paste from I'd have to use google. Don't want to be forced to do either in my code.