February 12, 2011
On 2/12/11 12:46 AM, Brad Roberts wrote:
> On 2/11/2011 4:07 PM, Andrei Alexandrescu wrote:
>> 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
>
> There were a lot of places that needed to change from uint to size_t, yes.  But bugs by the use of unsigned.. a rather
> small number.  Considering that I did the majority of the d2 64 bit work, I think I can say that with confidence in it's
> accuracy.
>
> Later,
> Brad

Walter has a story of staring at a couple lines of code for hours, that was discussed in this forum.

Andrei
February 12, 2011
On 02/12/2011 09:44 AM, "Jérôme M. Berger" wrote:
> spir wrote:
>> On 02/12/2011 03:05 AM, Jonathan M Davis wrote:
>>> While iota isn't clear, it _does_ have the advantage that you're
>>> not going to _mis_understand
>>
>> Maybe you say this because iota does not mean anything for you (?). I
>> can easily imagine various appropriate uses of iota in a PL, like:
>>
>> * smallest representable value in a given numeric format
>> * threshold over which some measure should be taken into account
>> * threshold under which some difference should be ignored
>> * range for approximate equality (approxEquals: |x - y|<  iota)
>> * tolerance interval of technical measures (similar)
>> * ...what else?
>>
> 	Range with a single element (i.e the smallest non-empty range).
> Which is actually how I interpreted “iota” the first time I saw it
> (since it was obvious from the context that it was a range).

Makes sense for me as well.

Denis
-- 
_________________
vita es estrany
spir.wikidot.com

February 12, 2011
On 02/12/2011 04:49 AM, spir wrote:
> That page looks listing various meanings in foreign languages, but mostly
> stincks with the greek letter; it does not mention any sense everday sense iota
> actually has. Example fro fr.wiktionary:

Oops, sorry for that noise, Denis
-- 
_________________
vita es estrany
spir.wikidot.com

February 12, 2011
Jonathan M Davis:

> interval is slightly better, but as you mention, the step value muddles that abstraction.

It's not muddled enough to make it worse than iota(). "iota" has nearly no relation with its purpose in Phobos.


> genSequence is pretty much the only thing that I've been able to think of that I like at all,

sequence(10,20,2) is another option, as long as "interval".


> So, if we want to actually vote on this, then we should come up with a set of suggestions for the name and then start a new thread vote the vote.

I agree, in such things you need a two step process, as in brainstorming a phase of inflation and ideas creation, followed by the phase phase of critical thinking and choice.

Bye,
bearphile
February 12, 2011
On 02/12/2011 12:02 PM, bearophile wrote:
>> genSequence is pretty much the only
>> >  thing that I've been able to think of that I like at all,
> sequence(10,20,2) is another option, as long as "interval".

Know what? I've been thinking for a while that "sequence" would be quite a good name for D ranges. Including lazy "on-demand-generated" ones (like maps), infinite ones (cubes of natural ints), and plain views (D slices, reversed, every third item, filters in general...).
Then one "traverses" a sequence (= iteration) just like an in-memory collection. And/or traversal of in-memory collection actually happens via a (possibly implicite) standard sequence of the collection.

>> >  So, if we want to actually vote on this, then we should
>> >  come up with a set of suggestions for the name and then start a new thread vote
>> >  the vote.
> I agree, in such things you need a two step process, as in brainstorming a phase of inflation and ideas creation, followed by the phase phase of critical thinking and choice.

Seems phase #1 is well engaged ;-)

denis
-- 
_________________
vita es estrany
spir.wikidot.com

February 12, 2011
On 2/12/11 5:02 AM, bearophile wrote:
> Jonathan M Davis:
>
>> interval is slightly better, but as you mention, the step value muddles that
>> abstraction.
>
> It's not muddled enough to make it worse than iota(). "iota" has nearly no relation with its purpose in Phobos.

And that's part of what makes it best.

Andrei
February 12, 2011
On 2/12/11 5:02 AM, bearophile wrote:
> Jonathan M Davis:
>
>> interval is slightly better, but as you mention, the step value muddles that
>> abstraction.
>
> It's not muddled enough to make it worse than iota(). "iota" has nearly no relation with its purpose in Phobos.
>
>
>> genSequence is pretty much the only
>> thing that I've been able to think of that I like at all,
>
> sequence(10,20,2) is another option, as long as "interval".

Taken, see std.range.sequence.

Andrei

February 12, 2011
Andrei:

> > It's not muddled enough to make it worse than iota(). "iota" has nearly no relation with its purpose in Phobos.
> 
> And that's part of what makes it best.

To design APIs for other people you have to understand why this is awfully wrong.

Bye,
bearophile
February 12, 2011
On 02/12/2011 12:25 PM, Andrei Alexandrescu wrote:
> On 2/12/11 5:02 AM, bearophile wrote:
>> Jonathan M Davis:
>>
>>> interval is slightly better, but as you mention, the step value muddles that
>>> abstraction.
>>
>> It's not muddled enough to make it worse than iota(). "iota" has nearly no
>> relation with its purpose in Phobos.
>
> And that's part of what makes it best.

What about a random name generator to define a language.stdlib's lexicon? Then run a post-filter fed by user complaints about given names actually suggesting some relation to any [part|aspect] of their sense.

denis
-- 
_________________
vita es estrany
spir.wikidot.com

February 12, 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