←back to thread

155 points samuell | 1 comments | | HN request time: 0s | source
Show context
mihaic ◴[] No.44747304[source]
It's become a pet peeve of mine, but for the love of God, if anyone with input in Carbon is scanning this, what can be done to use "func" instead of "fn" as a keyword?

That all-consonant keyword always makes it seem like I'm reading Hungarian notation when reading Rust for instance. An other options I've seen for instance in Pony, "fun", is already an English word with a completely different meaning.

Even the "function" from Javascript seems fine to me.

replies(12): >>44747518 #>>44747538 #>>44747604 #>>44747791 #>>44747854 #>>44747943 #>>44747960 #>>44747974 #>>44748106 #>>44748147 #>>44748268 #>>44748672 #
mckravchyk ◴[] No.44747604[source]
C++ does not have a function keyword at all, I wonder why did they add it in the first place.
replies(3): >>44747744 #>>44747769 #>>44747871 #
Tuna-Fish ◴[] No.44747769[source]
The c++ notation for functions (and types in general) is horrible, and makes parsing much more expensive than it needs to be. Fixing it is step one if you are making a modern language.
replies(1): >>44749206 #
1. pjmlp ◴[] No.44749206{3}[source]
A compatibility required by C.