D-

Daniel Murphy yebblies at nospamgmail.com
Sun Feb 12 04:22:28 PST 2012


"Paulo Pinto" <pjmlp at progtools.org> wrote in message 
news:jh87aj$2upa$1 at digitalmars.com...
> Overloading is also possible with C++.
>
> I know compile-time magic is messy (to say the least) with C++, still it 
> is already there.

Having D able to work on embedded platforms isn't going to enable anything 
that wasn't possible, it will just make it easier and more pleasant.

>
>>
>>> So what does D- bring to the table, besides fragmenting the community?
>>
>> No need to fork the lanugage - just add a couple of pragmas and a basic C
>> backend.
>>
>>
>
> How basic would this C backend be? Specially taking into account it would 
> be one extra backend to support and not all embedded processors are even 
> able to support full ANSI C even on this day and age.
>

Honestly, I don't really know.  I've never written a C backend before.  I 
know the compiler already has code to print expressions and statements back 
out as D code, and this is not incredibly complex.  I don't know if it's 
possible to really keep it simple, but if it is...

The great thing about it only being a backend is that it benefits from all 
the work that goes into the frontend, and that is where most of the 
development is these days.  Not trying to support all D features means a lot 
of code can be directly mapped to C code - if you take out everything on my 
list, how much stuff in D is actually not supported by C?

> I am just playing a bit the devil's advocate here, as I think our industry 
> suffers a lot from the "Worse is Better" principle, and as such
> one really needs to think about ROI when proposing new solutions for
> problems with existing solutions, even if they aren't the best ones.

Yeah well, I'm not really discussing this as a solution to anything, just 
something interesting to try out.  Nobody sane would try to make something 
that works on every microprocessor out there, but if it was pluggable and 
open source, maybe people would rather be writing D than C?  I know I would, 
even for extremely low-level stuff. 




More information about the Digitalmars-d mailing list