[challenge] Bounded types

Simen kjaeraas simen.kjaras at gmail.com
Tue Oct 12 03:46:20 PDT 2010


Philippe Sigaud <philippe.sigaud at gmail.com> wrote:

> On Tue, Oct 12, 2010 at 03:25, Simen kjaeraas <simen.kjaras at gmail.com>  
> wrote:
>
> Simen, I'm pretty sure you should be asleep right now. I know *I* should.

You may very well have had a point there. My days have shifted a bit
toward west lately.



>> I'm not sure, but couldn't the checks be debug-only (or non-release  
>> only,
>> if that were possible)?
>
> I'm not sure about that: I see Bounded as a type-level garanty that
> the passed in value won't be out of bound. But I can see why some
> people would like this kind of checks to be disabled in some versions.

It just strikes me as congruent with e.g. array bound checks.

-- 
Simen


More information about the Digitalmars-d mailing list