D as A Better C?
Mike
none at none.com
Tue Feb 11 15:06:19 PST 2014
On Tuesday, 11 February 2014 at 20:42:26 UTC, bearophile wrote:
> Walter Bright:
>
>> (First off, I hate the name "better C", any suggestions?)
>
> A different name is needed.
I don't think a different name is needed, nor do I think it would
be a good idea. All that's needed are a few compiler switches to
enable/disable features so D can be used on more platforms. GNU
g++ does this without giving it a new name (e.g. -fno-exceptions,
-fno-rtti, etc...) D can do the same without giving it a new
name.
>
>
>> What do you think?
>
> It must produce very small binaries.
>
> If you import anything from Phobos it will not work in most
> cases, even if the feature you are importing does not require
> GC, druntime, etc, because in most cases other parts of the
> Phobos module use them. Is this going to cause a fragmentation
> of Phobos?
>
> What to do with dynamic array literals? In many cases they
> allocate. A partial solution is to use the [...]s syntax for
> fixed size array literals.
>
> Constant associative arrays at global scope don't need the GC,
> but they need the druntime, so I guess they too need to be
> disallowed.
>
> Bye,
> bearophile
I don't consider Phobos part of thE D language, just part of the
D ecosystem. If one disables features on which phobos depends,
and phobos doesn't work, that's what they deserve.
In time, however, phobos could be ported to more limited systems
that don't have certain D features, but that's such a long term
goal right now. I wouldn't even worry about it until the runtime
is brought to those platforms first.
Mike
More information about the Digitalmars-d
mailing list