Whither Tango?

Jonathan M Davis jmdavisProg at gmail.com
Sun Feb 21 22:07:49 PST 2010


Rainer Deyke wrote:

> On 2/21/2010 17:42, Jonathan M Davis wrote:
>> Rainer Deyke wrote:
>> If I had to pick one, I'd go for genSequence since I prefer the idea of
>> "generating" a sequence to "making" one. I do like ioto for it's
>> memorability though.
> 
> The memorability of iota doesn't scale.  There are 24 letters in the
> Greek alphabet.  Imagine that each one was assigned a different function
> in D.  Would iota still be memorable next to eta and zeta?  Would you
> remember the difference between nu and mu, between eplison and upsilon?

Oh, I wouldn't try and scale it, and I certainly wouldn't suggest naming 
other functions so poorly. It's just iota _already_ has that name (and that 
name is used for such in other languages to boot), so there's some advantage 
in leaving it as is. However, regardless of whether it's a good idea to 
leave it as iota, I certainly wouldn't suggest going out and naming other 
functions with such obscure/unrelated names. That would definitely make 
things worse.
 
> 'iota' is memorable to you not because it's a good name, but because it
> stands out.  Out of any set of items, only a small subset can stand out.
>  A name that stands out is more memorable because it attracts attention,
> but that attention is pulled away from other names.  Therefore, the name
> 'iota' makes the rest of Phobos harder to learn, even if you never use
> 'iota'.

I don't see how iota makes the rest of phobos harder to learn. It's one 
poorly named function. All the rest could have brilliant names or absolutely 
horrific names, and iota wouldn't really have any impact on them either way. 
Sure, it draws attention, but that doesn't make more sensible names any more 
or less clear. I can see changing iota's name because it has nothing to do 
with what the function does, but I can't see changing it because it makes 
the rest of phobos harder to learn. I just don't see the connection.

When it comes down to it, a good deal of the problem is that the best a 
function name can do is give you an idea of what the function does. It's 
quite rare that it tells you _exactly_ what it does, making it so that you 
never have to look at the documentation to be sure.

In any case, I'm fine with iota being changed to genSequence or some other 
reasonably descriptive name, but I'm also fine with it staying it is simply 
because it's easy to remember, and the function is complicated enough that 
the name won't really tell you what it's doing anyway.

- Jonathan M Davis



More information about the Digitalmars-d mailing list