Jonathan M Davis jmdavisProg at gmx.com
Fri Feb 10 14:06:05 PST 2012

On Friday, February 10, 2012 13:54:49 H. S. Teoh wrote:
> Perhaps one solution is to simply have the compiler recognize all valid
> D constructs, but to give an error when it sees a construct not
> supported by the target platform. For example:
> input.d(123): Error: dynamic arrays not supported by target
> platform.
> This way, we don't cause fragmentation of D, and at the same time users
> will know which constructs should be avoided due to target platform
> limitations.

I think that the only switch even vaguely like that which has any chance of 
making it into the compiler is one which makes any constructs which use the GC 
illegal. And no one has been able to get Walter to even put _that_ in yet.

For the most part, I'd argue that if you don't want to use all of D's 
features, then just don't use them all. The only major issue that I'm aware of 
is if you want to avoid the GC entirely (either for performance reasons or 
paranoia), you're probably going to have to forgoe using a lot of Phobos.

- Jonathan M Davis

More information about the Digitalmars-d mailing list