Stupid little iota of an idea

Jonathan M Davis jmdavisProg at gmx.com
Sat Feb 12 05:36:54 PST 2011


On Saturday 12 February 2011 02:33:12 Jeff Nowakowski wrote:
> On 02/11/2011 11:14 PM, Jonathan M Davis wrote:
> > If anyone tried to use iota to actually mean something as a variable
> > or function name, I'd be suggesting that they pick a better nam.
> 
> So you're saying you don't like Andrei's chosen name? ;)

No. Andrei isn't trying to use the word based on its actual meaning. As it 
stands, the name is essentially nonsensical. That means that it's a vey poor 
name from the standpoint of figuring out what the function does based on its 
name.

_However_, precisely because it's such a short and nonsensical name, it's really 
easy to remember. I'm fine with keeping it as is. If someone could come up with a 
perfect replacement, then that woludn't be too bad, but honestly, I think that 
most of the names suggested actually increase the confusion.

With iota, you don't have a clue what it does based on its name, so you look it 
up. Then you remember it, because it's very memborable. With something like walk 
or interval, the name gives you a better idea of what it does, but it's _still_ 
not good enough for you to know based on the name and, since they mean something 
closer to what the function actually does but not quite, they risk misleading 
you as to what the function does. At least with iota, you know that you're going 
to have to look it up.

There's already precedent for iota as Andrei has stated, and it's been in 
std.algorithm for a while, so I'm fine with leaving it as is. It's a highly 
memborable name, and it's nice and short to boot.

- Jonathan M Davis


More information about the Digitalmars-d mailing list