←back to thread

155 points samuell | 1 comments | | HN request time: 0.214s | 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 #
gpderetta ◴[] No.44747854[source]
In C++ you can use indifferently either the class or typename keyword to introduce template arguments (because of course you can). A lot of styleguides suggest using typename because class is slightly misleading (the type could be anything not just a class).

In practice everybody just uses class, because who as the time to type the full keyword and signature declarations in C++ are already unwieldy as it is.

replies(1): >>44749216 #
pjmlp ◴[] No.44749216[source]
Anyone using a proper IDE instead of notepad like editor.
replies(2): >>44750020 #>>44751644 #
1. TinkersW ◴[] No.44751644[source]
I have that and still prefer class, easier to type(not just shorter, but easier keys) and less to read. Only use typename in the rare case where it is required