foreach (x; a .. b) and foreach_reverse (x; a .. b) should be disallowed for floats

Bill Baxter wbaxter at gmail.com
Mon May 18 10:30:19 PDT 2009


On Mon, May 18, 2009 at 9:21 AM, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> On Mon, 18 May 2009 12:02:30 -0400, Andrei Alexandrescu
>> I'm a bit leery about this - what if user code has a bug and I transform
>> that into a feature?
>
> hm... I guess that's one way to look at it.  I don't anticipate many typing
> this by mistake.

Can't you use variables in those ".." expressions?   If so it's not so
obvious when you see x..y that y is less than x.

--bb



More information about the Digitalmars-d mailing list