4 ms·
To 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 identifi
by jussij 6y ago
To 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.