←back to thread

155 points samuell | 2 comments | | HN request time: 0.001s | 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 #
pton_xd ◴[] No.44748147[source]
How about "proc"? Too different? I don't like fn either but function is too much. Fun and func aren't great either. I'd go with proc or fn.
replies(2): >>44749204 #>>44751387 #
pjmlp ◴[] No.44749204[source]
fun, press tab, modern IDE fills in the remaing function characters.

Unfortunately we keep designing languages for people using notepad.

Nowadays my editor even writes full blocks at a time.

replies(1): >>44750168 #
1. AnimalMuppet ◴[] No.44750168[source]
If "fun" and "func" are already "not great" (because, I presume, they're too long), then "fun[TAB]" is not the solution.

Mind you, I'm not saying that your solution doesn't work. Just that it doesn't work for the GP.

replies(1): >>44752956 #
2. pjmlp ◴[] No.44752956[source]
It is kind of ironic how people still get stuck discussing syntax to save keystrokes and then write a whole book on the AI chat window.