February 12, 2011
Sat, 12 Feb 2011 19:42:59 +0200, Max Samukha wrote:

> On 02/12/2011 07:12 PM, retard wrote:
>>
>> You're just arguing against his principles:
>>
>> "..besides arguments ad populum are fallacious"
>>
>> http://www.digitalmars.com/webnews/newsgroups.php? art_group=digitalmars.D&article_id=129453
>>
>>
> Yes, I use ad populum all the time for its effectiveness.
> 
> I'll try to wriggle out by saying it was not an argument for "iota" but rather counterargument to the ad populum argument that "iota" is bad since it exists only in the long-forgotten APL and an unknown C++ extension.

I can't deny facts. Iota is indeed quite widespread. I've seen it in several languages. However programming languages are like DNA. Even bad syntax sometimes gets in and becomes hard to remove.

Just a day or two ago bearophile showed how the octal literal syntax is harmful. But what happened is that it spread from C to C++, Java, and even Scala. Same can be said about the floating point literal syntax. Both 1. and .1 are very minor improvements mainly for the laziest developers out there. It's getting harder and harder to get rid of them. Avoiding these kind of conflicts between core language features should be priority #1.
February 13, 2011
"Jacob Carlborg" <doob@me.com> wrote in message news:ij6emq$27so$2@digitalmars.com...
> On 2011-02-12 02:25, bearophile wrote:
>> 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.
>
> Why can't we just get rid of that floating point literal syntax, it just causes problem.
>

It's another one of those things, like octal literals, that are there just because Walter likes it.


February 13, 2011
> 1. and .1 are very minor improvements mainly for the laziest developers
> out there. It's getting harder and harder to get rid of them. Avoiding
> these kind of conflicts between core language features should be priority
> #1.

For lazy developers? i don't think so, how lazy one can get anyways, after all we are not typists.
We most of the time think (i can't be the judge here actually), rarely type.

I would love to see the reasoning on this one, and how successfully made it into most if not all languages.
Sometimes i think designers make this kind of decisions for their depressive times. In those times they remember this and laugh how they fooled the whole world.
February 13, 2011
Sun, 13 Feb 2011 08:32:31 +0200, so wrote:

>> 1. and .1 are very minor improvements mainly for the laziest developers out there. It's getting harder and harder to get rid of them. Avoiding these kind of conflicts between core language features should be priority #1.
> 
> For lazy developers? i don't think so, how lazy one can get anyways,
> after all we are not typists.
> We most of the time think (i can't be the judge here actually), rarely
> type.
> 
> I would love to see the reasoning on this one, and how successfully made
> it into most if not all languages.
> Sometimes i think designers make this kind of decisions for their
> depressive times. In those times they remember this and laugh how they
> fooled the whole world.

Might be :-D
February 18, 2011
Nick Sabalausky wrote:
> "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.

I don't like interval at all, because I don't think it includes the notion of 'stepping'. An interval is just, everything from A to B, without necessarily specifying how you reach everything in that interval. Whereas iota includes the stepping.
(I would like to see intervals in the language, but just as an [a,b] pair).

OTOH iota() is unintuitive to me, and I do keep reading it as itoa().
Sadly I don't have any better suggestions.
February 18, 2011
On Fri, 18 Feb 2011 22:10:37 +0100, Don wrote:

> Nick Sabalausky wrote:
>> 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.
> 
> I don't like interval at all, because I don't think it includes the notion of 'stepping'. An interval is just, everything from A to B, without necessarily specifying how you reach everything in that interval. Whereas iota includes the stepping. (I would like to see intervals in the language, but just as an [a,b] pair).
> 
> OTOH iota() is unintuitive to me, and I do keep reading it as itoa().
> Sadly I don't have any better suggestions.

I have a similar range in SciD, which is called steps().  It differs from iota() in that a) you specify the number of steps instead of the step size and b) it only iterates over FP numbers and ensures that the first and last iterated values are in fact exactly the endpoints you specify.

I guess steps() would be a possible name for iota(), but then I would have to come up with a new name for my range. ;)

-Lars
February 18, 2011
Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote:

> I guess steps() would be a possible name for iota(), but then I would
> have to come up with a new name for my range. ;)

Might I suggest iota()? ;)


-- 
Simen
February 20, 2011
"Don" <nospam@nospam.com> wrote in message news:ijmndc$3e5$1@digitalmars.com...
> Nick Sabalausky wrote:
>>
>> 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.
>
> I don't like interval at all, because I don't think it includes the notion
> of 'stepping'. An interval is just, everything from A to B, without
> necessarily specifying how you reach everything in that interval. Whereas
> iota includes the stepping.
> (I would like to see intervals in the language, but just as an [a,b]
> pair).
>
> OTOH iota() is unintuitive to me, and I do keep reading it as itoa().
> Sadly I don't have any better suggestions.

I do agree that 'interval' is inaccurate because it doesn't imply stepping, but I still find 'iota' to be more inaccurate, it just means "a small amount", it carries no notion of range or endpoints or anything like that.


February 20, 2011
Don <nospam@nospam.com> writes:
> I don't like interval at all, because I don't think it includes the
> notion of 'stepping'. An interval is just, everything from A to B,
> without necessarily specifying how you reach everything in that
> interval. Whereas iota includes the stepping.
> (I would like to see intervals in the language, but just as an [a,b] pair).
>
> OTOH iota() is unintuitive to me, and I do keep reading it as itoa().
> Sadly I don't have any better suggestions.

Woudn't "step" be fairly appropriate? It does generate a step function after all.
2 3 4 5 6 7 8 9 10 11 12
Next ›   Last »