handful and interval
Sven Torvinger
Sven at torvinger.se
Mon Sep 3 02:37:56 PDT 2012
On Monday, 3 September 2012 at 09:01:37 UTC, Andrei Alexandrescu
wrote:
> On 9/3/12 10:27 AM, Philippe Sigaud wrote:
>> People here are talking about sets, but does Andrei really
>> have sets in
>> mind? That has consequences if you want 'in' to return a
>> pointer to a value.
>
> I wanted to define a couple of simple convenience functions. It
> seems we've headed into a paralysis of analysis.
>
> Andrei
I would advocate using, a < x < b, this trivially addresses
open/closed intervals etc.
I disagree with the porting from other languages argument...
comparing bool with < > is not a common occurring pattern, and
even if there is such code in the wild, many coding standards
would force the use of () if using such an expression anyway...
so the porting issues would be minimal.
More information about the Digitalmars-d
mailing list