What is the state of Microcontroller support in d?
Mike via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 20 02:21:29 PDT 2017
On Tuesday, 20 June 2017 at 08:48:05 UTC, Dan Walmsley wrote:
> How about creating a fork and calling it "SystemD or EmbeddedD"
> just 1 compiler (LDC probably), do you think its realistic idea?
It would take a very dedicated and talented individual, or a
small team of talent to do that. I'm not that individual, and
there doesn't seem to be much interest from the D community to
pull it off, IMO.
> I was so hopeful for D when I saw how nice the syntax is, I saw
> rust and I didn't get the same feeling, not that I wont give it
> a chance, I just feel as you know embedded systems is dominated
> by C and C++ and D seems closer to those than Rust.
I had the same initial reaction to Rust, and still do to some
extent. Rust does not have the modeling power and efficient code
reuse that D does. D allows you to write code the way you think
about it. Rust requires you to change the way you think about
your code. But D requires too many silly hacks and compromises
just to get a build that works. Rust allows you to incrementally
build up your system (pay-as-you-go) without any nonsense.
Despite my criticism, I think D has much more potential than
Rust, I just don't think it will ever be realized without a fork.
> To be fair I was impressed with the -betterC flag and that
> actually looks nice I you just want a C replacement but no
> classes, etc.
If -betterC were ever fully implemented it would indeed be a
"Better C", but it would also be a "Worse D" and I'd be forever
disappointed that I couldn't individually pay for the features I
wanted.
> I have not been able to get even a minimal project to compile
> when a class is introduced
>
> `Error: Missing class declaration: TypeInfo_AssociativeArray`
Stick with only structs until you get it working, then you can
tackle classes.
> Will take a look at rust, but would be keen to know if you
> could be motivated by the SystemD / EmbeddedD idea?
It would be a huge tangent from what I really want to do and
would require a different skill set than what I currently
possess. While I'm confident that I could acquire the necessary
skills to pull it off, I only have the resources to contribute to
such an endeavor on a part-time basis. It's not something I can
do right now.
I want to program machines that interface with the physical
world. I don't really want to have to build my own custom
toolchain to do it (But I wouldn't mind contributing to one).
Rust is also slowly improving, and if some of their RFCs ever get
implemented, it will obtain much more modeling power like D.
That's where I'm placing my bets at the moment.
Mike
More information about the Digitalmars-d
mailing list