5 ms·
On the question of "what's this?": type ImmutableTreeListᐸElementTᐳ struct "If you look closely, those aren't angle brackets, they're characters from the
by topspin 5y ago
On the question of "what's this?":
type ImmutableTreeListᐸElementTᐳ struct
"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."
Simultaneously amusing and disturbing. Is there an award for which one might nominate this person?
- deleted 5y ago[deleted]
- glouwbug 5y agoCanadians now roll with the term Indigenous instead of Aboriginal
- spenczar5 5y agoThat may be, but in this case it is a precise technical term, referring to a particular block of Unicode: https://en.m.wikipedia.org/wiki/Unified_Canadian_Aboriginal_Syllabics_(Unicode_block) https://en.m.wikipedia.org/wiki/Unified_Canadian_Aboriginal_... Maybe the Unicode Consortium should change it, but for now, Canadian Aboriginal is the correct term.
- uuddlrlr 5y agoColloquially in the north "native" is ubiquitous.
- andai 5y agoFor now...
- LudwigNagasena 5y agoIn 10 years a new word may become fashionable. Better to keep technical terms the same.
- Cthulhu_ 5y agoIt's not about fashion, it's about cultural identity. I take it you don't see a problem with master/slave either? Just do a find and replace, refactoring is easy and trying to argue on the internet about it is tiring.
- earleybird 5y agoIf identity is about appearance, that would seem to admit fashion for consideration.
- asguy 5y agoI take it you didn’t grow up in the 80s. Trends in words change: you’ll see it with your own eyes. > trying to argue on the internet about it is tiring. … exactly.
- jandrese 5y agoThat's the kind of thing you see in a comment and then back slowly out of the room, never breaking eye contact with the code until you are far enough away to turn tail and run. At the very least they could have used the cute Japanese 「quotation marks」 to avoid confusion.
- weego 5y agoThis is the person you need. Be assured that they were the person willing to log into the live prod server to fix that script that was killing your startups app at 2am on a Friday night in 2007 when everyone else was too gun-shy.
- killingtime74 5y agoJava Certified Professional
- kodah 5y ago> oh my god Definitely the correct response. Also, > c++ allows 0-width spaces in variable names. Where's your god now? Nowhere. We have strayed maximal distance from god's light and are currently in orbit around Satan.
- ithkuil 5y agoBow to the One whose Name cannot be expressed in the Basic Multilingual Plane
- jcelerier 5y ago> > c++ allows 0-width spaces in variable names. Is that true though ? > A valid identifier must begin with a non-digit character (Latin letter, underscore, or Unicode character of class XID_Start) and may contain non-digit characters, digits, and Unicode characters of class XID_Continue in non-initial positions. Identifiers are case-sensitive (lowercase and uppercase letters are distinct), and every character is significant. Every identifier must conform Normalization Form C.
- therein 5y ago> every character is significant. Every identifier must conform Normalization Form C. This seems to be the only limitation for that to be true. So the question is does 0-width space (U+200B) survive canonical decomposition, followed by canonical composition? It feels like it does to me.
- jeroenhd 5y agoI don't know about the standard, but both GCC and Clang accept ZWSP characters in the middle of variable names. Clang logs a warning about potentially invisible characters every time you use them. g++ just compiles the code without warning, even with -Wall and -Wpedantic. What clang _doesn't_ warn for, is the use of the left-to-right override character. This can be used to confuse the victims of your code even more.
- LastMuel 5y agoI'm dying. This is hilarious.
- iamcreasy 5y agoI suppose there are many examples like this. Once I've copied a piece of code from SO but IntellijIDEA was warning me that the semicolon at the end of the line is not correct. Upon further investigation(I think IntelljIDEA reported Unicode value) I've found out that the 'semicolon' I copied is a Greek character that looks exactly like semicolon. I wonder how people on vim/emacs deal with situation like this.
- maattdd 5y agoOn VSCode, I use the Gremlins extension which highlight all those suspicious characters. https://github.com/nhoizey/vscode-gremlins https://github.com/nhoizey/vscode-gremlins
- ipmonkey 5y agovim user here. Most of us are running the same linters and language servers as every other major editor, which does a pretty good job catching stuff like this. Modern vim is really only a C core with a web of JS, Python, Lua, and vimscript using the exact same third party solutions for every other part of an "IDE". emacs is probably similar, but no personal experience with that.
- CodesInChaos 5y agoThe rust compiler warns when it encounters confusable symbols like that. Not sure about other languages.
- Cthulhu_ 5y agoIt's similar when online editors try to be clever and replace a straight " with a fancy one (like in Word), really annoying.
- Joker_vD 5y agoThat's why Powershell actually recognizes those fancy quotes and treats those as normal quotes.
- 5y ago