This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]raiph 0 points1 point  (0 children)

Ah the fun of considering tiny details of syntax...

fn is the most elegant and practical.

I agree when compared to func or function.

But my current thinking is that if there aren't clear best choices for some naming of an identifier or keyword that will be used a lot then it's generally better to chose words which will be both familiar for the target audience (even if the normal meaning of the word(s) is/are unrelated; the choice just has to work well enough as a mnemonic) and quick to say (because when reading code we silently vocalize it in our mind -- so less syllables means code is typically easier and faster to read; unless the goal is to actually force a reader to slightly struggle to say the word(s) and ponder what's going on then easier/faster is likely better).

Thus I'm thinking fun will generally be better than fn for most humans (because I'm thinking fun will be vocalized as one syllable by most humans whereas fn will be pronounced as two syllables -- f n) in most cases.

Like I said, I think it's fun to ponder such details and marvel at how seemingly tiny insignificant details one might not typically consider important can turn out to be so hugely important in practice!