3 ms·
Why don't they just use characters from the Canadian Aboriginal Syllabics block? https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and
by jiggawatts 6y ago
Why don't they just use characters from the Canadian Aboriginal Syllabics block?
https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/ https://www.reddit.com/r/rust/comments/5penft/parallelizing_...
- ed25519FUUU 6y ago> type ImmutableTreeListᐸElementTᐳ > If you look closely, those aren't angle brackets, they're characters from the Canadian Aboriginal Syllabics block, which are allowed in Go identifiers. From Go's perspective, that's just one long identifier. And the next comment is the same thing everyone else is thinking: “oh my god”
- bobbyi_settv 6y agoI also like this comment from the almost-empty /r/ProgrammerHumor/ submission linking to that thread: Gives new meaning to the phrase "Native apps"
- jussij 6y agoTo be fair I suspect this part of that sentence explains the reason for choice of these special character: From Go's perspective, that's just one long identifier. The designer was using those characters to trick the Go compiler which I then suspect means things like go format would also continue to work. Then the designer could easily create a pre-processor that translates those placeholders characters as a way of providing some sort of generics in Go. So in reality this was quite a good solution as I can imagine coming up with a solution that broke go format would have been a real pain to use.
- mseepgood 6y ago> So in reality this was quite a good solution Yes, I do not understand why people find this so hilarious. It's a clever choice.
- irrational 6y agoBecause they look like normal angle brackets. Unless you are in on the secret, you won’t understand why your code doesn’t work.
- thaumasiotes 6y agoEasily fixed by using ᑅ ᑀ, ᕙ ᕗ, or ᗕ ᗒ.
- jiggawatts 6y agoFor some values of "easily" and "fixed".
- ed25519FUUU 6y agoMaybe it’s just at the companies I’ve worked at, but replacement vars are usually double underscores: Here is __REPLACE__ var.
- heavenlyblue 6y agoThat is a clever choice. A wise choice would be simply adding double underscores between the identifiers.
- ed25519FUUU 6y agoThe fact that the author needs to explain how it works on an Internet forum is evidence it was neither a clear nor clever choice, but a probably a bad choice.
- trey-jones 6y agoClear is better than clever.
- marcosdumay 6y agoI like to know this: > c++ allows 0-width spaces in variable names. Where's your god now? I imagine many languages do the same, but I lack the will to test it. Anyway, of course, it would be more correct if it was considered whitespace... And I bet anything parsed in Haskell or Perl6 does such.
- ceocoder 6y agoI had to blink a couple of times and then google it to verify it wasn’t a joke. Wow. To quote my favorite mathematician specializing in chaos theory, ”Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should.“
- zozbot234 6y agoIIRC these characters are also used in the reference implementation from the proposal authors, of course.
- conistonwater 6y agoTerrible idea, it would break that person's use case.
- tomp 6y agoEvery time I click a Reddit link I'm astounded about how bad & user-hostile the new UX is. Old-style link: https://old.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/ https://old.reddit.com/r/rust/comments/5penft/parallelizing_...
- kgwxd 6y agoIf you have an account you can set the old style as the default. No email required to sign up even though they sort of make it seem one is, just hit next.
- ulucs 6y agoI use the Redirector addon to deal with other stuff, so it also helps without having to set up an account anywhere
- jessriedel 6y agoThe new UX is terrible, but note you can still minimize comments by tapping the white space to the right of the username. Horrible discoverability, but at least that is still there.
- tomp 6y agoHa! I didn't even notice the lack of [-] signs! I guess I never had a big need to do that... Actually my biggest complaint is the lack of ability to maximize comments - basically, I detest having to click n times just to be able to read the whole discussion. There's a bit of content, and mostly SPAM on that page. Old design was mostly content.
- kyrra 6y agoSee: https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#why-not-use https://go.googlesource.com/proposal/+/refs/heads/master/des... > Why not use F«T»? > We considered it but we couldn't bring ourselves to require non-ASCII.