Hacker News new | ask | show | jobs
by sorokod 1734 days ago
A house is leaking from the roof.

If the language designers allow methods named "!^", then someone will actually name a method "!^".

3 comments

Most languages allow a variable called "i", but it is for the programmer to choose when that is appropriate.

!^ might be useful, if the code implements an algorithm which uses this notation in the literature.

A hoarder never throws anything away because it "might be useful". That is not a useful criteria for choosing language features.
I think variables names and infix operators/method names are very different.
> A house is leaking from the roof.

Should one prefer the case where an adult cannot order a steak, because a baby can't chew it? Like, there is a grammar for acceptable identifiers, and it is a little broader than most. To me it seems like a good thing that unicode/multibyte identifiers are allowed, and that not more than the necessary portion of the top keyboard row symbols is reserved.

Yes, I'd like to have a beer with the people who think it's smart to allow punctuation as identifiers. Hopefully by the third pint I could change their minds...