null [re: spec#]

steveh steveh57 at useshotmai.l
Sat Nov 6 05:45:34 PDT 2010


bearophile Wrote:

> foobar:
> 
> > Any type can be wrapped by an OPTION type. trying to do the converse of this is impractical and is bad design. 
> 
> Discussing this is a waste of time now, this part of the D language will probably never change.
> This is why other people and me are proposition something different.

I've known there are hidden tradeoffs when using these 'intelligent' types. Non-null types add terrible runtime checks everywhere. It's simply not acceptable in a systems programming language. Operating system kernel uses very efficient uninitialized arrays for buffers. It's crazy to force this non-null hype down our throats.

I fail to see why non-null is needed. Sometimes even immutability seems too difficult. You can write safe code, you can write efficient code, and you can write simple code. But these can't be the same code! Is Spec# used anywhere? Don't think so. No TIOBE? No language shootout entries. We should forget it.


More information about the Digitalmars-d mailing list