On 2010-02-20 11:14:48 -0500, Andrei Alexandrescu <seewebsiteforem...@erdani.org> said:

Michel Fortin wrote:
I don't think there are really any 'silly' names (except perhaps iota), it's just that many don't do exactly what you think they do on first reading.

The lengthy post below talks about _one_. If there are "many", you should be able to effortlessly list a handful.

It takes some time to notice them as they're more subtle that just names that look wrong. I'm sure I encountered a couple of them while using Phobos, although I can't remember others right now (which might be due to me avoiding them now). If you're interested, I can dig a little.

But if you're just going to dismiss the criticism by asserting they're good semantics anyway (just different that what I expect), then I'm not sure it's worth the time finding them and explaining the problem for each of them. I'd do better create my own range module and use it instead, as I already have some other reasons pushing in that direction.


At the end of the day you can't expect to fly blind through an entire library.

I'm speaking of one function right now, not an entire library. Assuming someone knows the concept of ranges, I think a function called "take" taking a range and a length argument should be pretty obvious without looking at the documentation.

"take" could be defined with a number of arguably good semantics.

The minimal thing I'd expect of a "take" function is that it takes something when you call it. But this one doesn't. I don't see how you can call that "good semantics".

But now I wonder, what is everyone's expectation of a function called "take"?


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to