Stupid little iota of an idea

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Feb 12 13:57:21 PST 2011


I'd maybe vote for the syntax change.

But maybe we could extend the array slice syntax to construct ranges:

filter!`a % 2 == 0`([1..5])
auto r = [0 .. 5];

So if the slice sits on its own it becomes a range. Or is this too
scary/ambiguous?

I don't really like them alone:
filter!`a % 2 == 0`(1..5)
auto r = 0 .. 5;

Otherwise I'd probably vote for "walk", or if we can't settle as a
majority on a word I guess we'll just stick to iota and that will be
the end of it. I don't hate it but newbies will be confused with it.

But you're only a newbie once, right? :)


More information about the Digitalmars-d mailing list