On 2012-02-10 23:06, Jonathan M Davis wrote:
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

It's possible to remove the GC and you'll get linker errors when the GC is used. This is a hack but it works today.

--
/Jacob Carlborg

Reply via email to