Often repeated array allocations

bearophile bearophileHUGS at lycos.com
Sun Jul 21 04:36:44 PDT 2013


Namespace:

> I agree, but how? ;)
> You know by yourself that Walter & Andrei are very hard to 
> convince by such things.

I think there is only a small number of Ada ideas worth copying, 
like:
- Integral overflows;
- Ranged integers;
- A library of collections allocated in-place in the standard 
library (Bounded Collections of Ada2012);
- More deterministic multi processing;
- Nicer and more handy enumerated sets;
- No undefined behaviours;
- Stack-allocated fixed-length arrays;
- etc.

Some of such things are work in progress (no undefined 
behaviours), some of them can go in the D standard library 
(bounded collections, variable length arrays with a bit of help 
from the compiler), some of them can be implemented with help 
from the compiler (partially library-defined integral type with 
overflow tests). Some of them maybe can be implemented once some 
bugs are sorted out and alias this gets better (ranged integers). 
Some of them are just currently not present in D (more 
deterministic multi processing), but D is supposed to have 
something to replace them ("scope", a better "shared", Walter is 
introducing a bit of object ownership behind the curtains, etc).

And then it becomes a matter of using some of those idioms.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list