d-programming-language.org

Steven Schveighoffer schveiguy at yahoo.com
Mon Jul 4 12:34:19 PDT 2011


On Mon, 04 Jul 2011 14:49:03 -0400, eles <eles at eles.com> wrote:

>> I have an idea - how about the notation Uncircular!uint to designate
>> such a type?
>> Andrei
>
> Either put it into the standard language, either I have a better one.
> what about dropping printf and start using:
>
> mov  ah, 9
> int  0x21
>
> instead?
>
> I am sure it can be done. So, why not dropping all D and start to
> code back into assembler?

I think that's a really good idea.  I'm sure there's a great assembly  
newsgroup or forum where you can post your ideas and mock the D community  
for the bunch of boobs that we are.

> The point is that "it can be done even if the current context" is a
> shallow excuse for rejecting better ways to achieve something.

I think the rejection is for the assumption of superiority.  I.e. your way  
isn't better, or even possible, given the existing code base.

To the point -- lots of existing D and C code uses the properties of  
integer overflow.  If integer overflow is assumed to be an error, then  
that code is broken, even though the code *expects* overflow to occur, and  
in fact might *depend* on it occurring.

A more logical path is to build a new type, that's not in any existing  
code base, which handles overflow using exceptions.  Then a developer can  
choose to use this new type if he wants to throw an exception on  
overflow.  If this is not acceptable to you, I suggest you drop it anyways  
-- altering the builtin types is not going to happen.  Ever.

-Steve


More information about the Digitalmars-d mailing list