Naming things
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 22 07:09:10 PDT 2015
On Monday, 22 June 2015 at 11:51:27 UTC, Vladimir Panteleev wrote:
> Just to reiterate, I want to stress that finding a perfect name
> is of secondary concern to deciding to change the name in the
> first place. A big part of the argument against renaming things
> is "look how much debate there is about what it should be
> called, it's obvious there is no consensus, let's just leave
> things as they are".
I think that it's abundantly clear that the names are not well
chosen. It's a guarantee that you're going to have to look at the
docs to have any clue as to which is lazy and which isn't. I
completely agree with adding lazy versions of the functions like
Walter is doing, and our naming situation sucks on some level
given that we have never named things based on whether they were
lazy or not, and so there really is no way that all of the names
in Phobos are going to be consistent in that manner (not without
breaking more code than we're willing to break anyway), but the
new names do seem particularly bad. A function that starts with
set doesn't even sound like it's lazy anyway - not to mention,
wasn't setExt the old function that std.path had before it was
revamped?
Naming stuff is hard, but there is definitely a cost to poor
names, which is something that Walter rarely seems to
acknowledge, especially if it means changing an existing name -
but since this is about functions that haven't even been released
yet, I wouldn't think that it would be as big a deal to change
them.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list