version=D_16

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 10 14:30:44 PDT 2017


On 7/10/2017 1:52 PM, Luís Marques wrote:
> On Monday, 10 July 2017 at 20:19:46 UTC, Walter Bright wrote:
>> On 7/10/2017 12:46 PM, Luís Marques wrote:
>> I'm curious how that implementation addresses the issues I brought up:
> 
> I'm not really sure how to respond, you mostly just made statements about your 
> worldview. For instance:
> 
> "C++ on a 64K machine is like using a tank to get to the grocery store". If you 
> mean using all of C++ features, sure, that's inappropriate. If you mean that 
> there are no C++ features that you could use in a microcontroller, there are 
> non-trivial amounts of people the disagree with you.

You can't use RTTI or Exceptions, for example. Those generate bloat even if they 
are not used - a compiler switch is typical to disable them. It's not true that 
C++ is "pay only for what you use".

If the C++ usage is "C with member functions", then yes, it'll work and be useful.


> "D for 16 bits wouldn't really be D, it would be a D variant with different
> semantics and capabilities. (Like C++ for 16 bits.)" -> so far LDC with 
> mtriple=msp430 has worked for me, for my needs. I don't really know what you 
> mean by D for 16 bits...

For example, ints in C are 16 bits. In D they are 32. This means that integer 
operations are expensive.

But hey, if it works for your application, I can't argue with that!


More information about the Digitalmars-d mailing list