A strange div bug on Linux x86_64, (both dmd & ldc2): long -5000 / size_t 2 = 9223372036854773308

Avrina avrina12309412342 at gmail.com
Fri Aug 14 22:06:07 UTC 2020

On Friday, 14 August 2020 at 21:29:42 UTC, Walter Bright wrote:
> On 8/14/2020 6:32 AM, Adam D. Ruppe wrote:
>> just I don't care, I want 16 bit operations here.
> The design considerations are mutually incompatible:
> 1. performance
> 2. aesthetics
> 3. requiring casts breaks generic code
> 4. should be able to index the entire address space
> 5. I need wraparound arithmetic
> 6. I need saturation arithmetic
> 7. must throw exception on overflow/underflow
> 8. must not throw exception on overflow/underflow
> 9. should work like 3rd grade arithmetic
> 10. type inference
> 11. should work like C
> 12. should work like C#
> 13. should work like Java
> 14. should work like Python

I think most people would rather not have it work like C, or as a 
compromise work like C and have warnings like C as it is bug 
prone. Both those are better than what D is doing now. Trying to 
make it look like a strawmans, it seems there's a disconnect 
between designers and users that write actual code.

> Language design is an art where we do the best we can given 
> what the language use is targeted at.
> D is meant for high performance, systems programming, memory 
> safety, and C compatibility. The compromises go in that 
> direction.

Most people looking for language that is for high performance and 
systems programming would probably not want a GC. They can not 
use the GC but a lot of features are lost because they 
specifically cator to the GC.

More information about the Digitalmars-d mailing list