February 11, 2011
"Steven Schveighoffer" <schveiguy@yahoo.com> wrote in message news:op.vqqsdxcaeav7ka@steve-laptop...
>
>> According to the book "The Design of Everyday Things" the design of that function name is wrong, it's not your fault and it's not because it was 3am. When many people make mistakes with regards to the design of something it's *always* the design's fault, never the human's fault.
>
> I love that book, I wish more software engineers used it.  One of my favorite classes at college.
>

I probably would have liked that class if my college hadn't degenerated it into nothing more than "group VB6 project". Bleh. I always hated group projects.  /me "Does not play well with others."

I really should actually read that book. I've heard a lot about what it says, and I like everything I've heard. Even without having read it, it's still influenced me a fair amount.



February 11, 2011
"bearophile" <bearophileHUGS@lycos.com> wrote in message news:ij473k$1tfn$1@digitalmars.com...
> Andrei:
>
>> Aside from the fact that "range" has another meaning in D, the word does not convey the notion that iota adds incremental steps to move from one number to another. "Iota" does convey that notion.
>
> I have accepted  the "iota" name, it's short, easy to remember, it has one historical usage in APL, and "Range" has another meaning in D (but it's weird, and it's something you need to learn, it's not something a newbie is supposed to know before reading D2 docs well. The name "interval" is better, simpler to understand, but it's longer for a so common function).
>
> But this answer of yours is stepping outside the bounds of reasonableness :-) If you ask a pool of 20 programmers what range(10,20) or iota(10,20) means, I'm sure more people will guess range() correctly than iota(). The word range() do convey a complete enumeration of values in an interval. iota() does not convey that.
>
> Said all this, I suggest to introduce the first-class a..b interval syntax in D (or even a..b:c), this is able to remove most (all?) usage of iota().
>

I like "interval", too.

I do think the name "iota" is a nice extra reason to just use a..b or a..b:c like you say. It also makes it clear that it's a series of discrete values rather than a true mathematical range, since that's exactly how foreach already uses a..b: as a series of discrete values.



February 11, 2011
On Fri, 11 Feb 2011 17:03:13 -0500, Nick Sabalausky <a@a.a> wrote:

> "Steven Schveighoffer" <schveiguy@yahoo.com> wrote in message
> news:op.vqqsdxcaeav7ka@steve-laptop...
>>
>>> According to the book "The Design of Everyday Things" the design of that
>>> function name is wrong, it's not your fault and it's not because it was
>>> 3am. When many people make mistakes with regards to the design of
>>> something it's *always* the design's fault, never the human's fault.
>>
>> I love that book, I wish more software engineers used it.  One of my
>> favorite classes at college.
>>
>
> I probably would have liked that class if my college hadn't degenerated it
> into nothing more than "group VB6 project". Bleh. I always hated group
> projects.  /me "Does not play well with others."

From what I can remember, I did not have to write any code in that class.  I had to pick an item in my household and write a paper on what features were well designed and which ones were poor.  I have a feeling you would have loved that ;)

-Steve
February 11, 2011
Nick Sabalausky:

> I really should actually read that book.

Donald Norman is not a genius, he seems to lack both in engineering knowledge and classic literary culture, but despite this he has the right mindset to explore the world and he does look a lot at the world and its things, so he ends saying many interesting things. I suggest to read all books written by him :-)

Bye,
bearophile
February 11, 2011
"Steven Schveighoffer" <schveiguy@yahoo.com> wrote in message news:op.vqrewtcfeav7ka@steve-laptop...
> On Fri, 11 Feb 2011 17:03:13 -0500, Nick Sabalausky <a@a.a> wrote:
>
>> "Steven Schveighoffer" <schveiguy@yahoo.com> wrote in message news:op.vqqsdxcaeav7ka@steve-laptop...
>>>
>>>> According to the book "The Design of Everyday Things" the design of
>>>> that
>>>> function name is wrong, it's not your fault and it's not because it was
>>>> 3am. When many people make mistakes with regards to the design of
>>>> something it's *always* the design's fault, never the human's fault.
>>>
>>> I love that book, I wish more software engineers used it.  One of my favorite classes at college.
>>>
>>
>> I probably would have liked that class if my college hadn't degenerated
>> it
>> into nothing more than "group VB6 project". Bleh. I always hated group
>> projects.  /me "Does not play well with others."
>
> From what I can remember, I did not have to write any code in that class. I had to pick an item in my household and write a paper on what features were well designed and which ones were poor.  I have a feeling you would have loved that ;)
>

lol, that's a good point, I probably could have had a lot of fun with that :)


February 11, 2011
On 2/11/11 2:46 AM, Jacob Carlborg wrote:
> On 2011-02-10 23:05, Andrei Alexandrescu wrote:
>> On 2/10/11 9:47 AM, spir wrote:
>>> Even then, noone forces D2 to blindly reproduce stupid naming from
>>> APL/C++, I guess. Or what?
>>
>> I don't find the name "iota" stupid.
>>
>> Andrei
>
> Of course you don't think it's stupid, you named it. It starts to look
> more and more that you are the only one that likes it. How about we vote
> about it ?
>

Sure. Have at it! I'll be glad to comply with the vote.

Andrei
February 12, 2011
On 2/11/11 8:32 AM, Daniel Gibson wrote:
> Am 10.02.2011 12:40, schrieb spir:
>>
>> Certainly, because it's /highly/ important for a community of programmers to
>> share the same "culture". And names are the main support&  vehicle for this
>> culture.
>>
>> Denis
>>
>> (For this reason, I stoppped aliasing size_t and size_diff_t to Ordinal and
>> Cardinal ;-) I use uint everywhere)
>>
>
> This will cause trouble on 64bit systems, because there size_t is ulong.
>
> Cheers,
> - Daniel

Yah... big problems on Phobos' 64-bit port.

Andrei
February 12, 2011
On 2011-02-11 19:55:05 -0500, bearophile <bearophileHUGS@lycos.com> said:

> I am not going to invent a new wonderful name for it, sorry :-) My votes, in decreasing order of preference:
> 1) By far, a syntax like a..b:c, or missing that, a syntax like a..b

No one noticed yet that the a..b:c syntax causes ambiguity? Tell me, how do you rewrite this using the new proposed syntax:

	auto aa = [iota(a, b, c): 1, iota(d, e): 2];


> 3) If you refuse the word "range", then my third choice is "interval". It's as cleas as range, but it's a bit worse because it's longer.

Interval is clear only as long as there's no step value mentioned. Having a step value is quite a stretch from the usual notion of an interval.

I like a lot so's suggestion "walk". I'm not sure it's much clearer than iota though.

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

February 12, 2011
Michel Fortin:

> No one noticed yet that the a..b:c syntax causes ambiguity? Tell me, how do you rewrite this using the new proposed syntax:
> 
> 	auto aa = [iota(a, b, c): 1, iota(d, e): 2];

Right, that's why in another post I have said that syntax replaces most iota usages. There are some situations where you can't use it well. This is another situation I've shown in the enhancement request:
iota(10.,20.)
Writing it like this is not sane:
 10...20.


> Interval is clear only as long as there's no step value mentioned. Having a step value is quite a stretch from the usual notion of an interval.

Right, but I think it's acceptable still, and better than iota.


> I like a lot so's suggestion "walk". I'm not sure it's much clearer than iota though.

It's better than iota, but not by much.

Bye,
bearophile
February 12, 2011
Am 12.02.2011 02:25, schrieb bearophile:
> Michel Fortin:
> 
>> No one noticed yet that the a..b:c syntax causes ambiguity? Tell me, how do you rewrite this using the new proposed syntax:
>>
>> 	auto aa = [iota(a, b, c): 1, iota(d, e): 2];
> 
> Right, that's why in another post I have said that syntax replaces most iota usages. There are some situations where you can't use it well. This is another situation I've shown in the enhancement request:
> iota(10.,20.)
> Writing it like this is not sane:
>  10...20.
> 
> 
>> Interval is clear only as long as there's no step value mentioned. Having a step value is quite a stretch from the usual notion of an interval.
> 
> Right, but I think it's acceptable still, and better than iota.
> 
> 
>> I like a lot so's suggestion "walk". I'm not sure it's much clearer than iota though.
> 
> It's better than iota, but not by much.
> 
> Bye,
> bearophile

I think it's much better. Even having "steps" (or a stepsize) is obvious with walk.

iota only makes sense when you know this from other languages/libraries or if
your native spoken language has a similar word that can be somehow connected.
http://en.wiktionary.org/wiki/iota doesn't give a real connection (and two
English->German dictionaries I've checked don't either - one only listed iota as
the greek letter, the other had mentions about something tiny) - it's just
something small like that greek i-without-a-dot letter.
There's nothing that connects it to a range of values with a fixed step size.

Cheers,
- Daniel