D as A Better C?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Feb 11 20:51:39 PST 2014


On 2/11/14, 6:47 PM, Daniel Murphy wrote:
> "Walter Bright"  wrote in message news:lddug4$jgv$1 at digitalmars.com...
>
>> I've toyed with this idea for a while, and wondered what the interest
>> there is in something like this.
>>
>> The idea is to be able to use a subset of D that does not require any
>> of druntime or phobos - it can be linked merely with the C standard
>> library. To that end, there'd be a compiler switch (-betterC) which
>> would enforce the subset.
>
> Yeah, this has been on my todo list for a long time, last time it came
> up it resulting in this: https://github.com/yebblies/dmd/tree/microd
>
> I would love to use this at work, although of course dmd does not
> support any of the architectures I need.

Well that should raise a question about the proper priorities.

> For all the people crying about forking the language, this will only
> fork the language as much as @safe did (ie not at all).

As I told Walter: there's this joke that goes as follows. A guy goes to 
the doctor and the doctor asks "How is your sex life?" and the guy goes, 
"Almost every day!" "How do you mean that?" "Almost on Monday, almost on 
Tuesday, almost on Wednesday..."

We almost have a working @safe, we almost have good reference counting, 
we almost have good copy construction, we almost have a working "shared" 
qualifier, we almost have a solution to NonNull, we almost have complete 
qualifier inference, and we almost have a self-hosting compiler.

Last thing we want is to add an almost working "better C" thingamaroo to 
the list.


Andrei



More information about the Digitalmars-d mailing list