If you wanted to use a high level language on a micro-controller, there’s not a lot of options. There is micropython and Squirrel, but they are both interpreted and relatively slow. They also make heavy use of heap memory. C++ is perhaps the best option if you want a highish-level object-orientated language, but it is a relatively verbose and difficult language (compared to python and so on). Header guards, maintaining both source & header files . . . even class access modifiers. After working with a high level language, these all seem so unnecessary.
I’ve been using Vala lately for some desktop programming tasks. It’s a nice language to use. It’s a language that has C# inspired syntax and it compiles down to C code. It’s fast to develop with, safer than C, and the executables it produces are fast! Wouldn’t it be nice to have an equivalent for Arduino?
What I’d like to do is create a language that contains all the niceties and built-in safety of Python and other high level languages. It must compile down to a subset of C++ and it must be fully (mostly?) compatible with the mountains of other C/C++ code out there for Arduino.
To make it compatible with C++, the source-to-source compiler wouldn’t be able to do any type checking - that’d be left to the C++ compiler. It probably wouldn’t be that difficult really. C++ already has all the features, it’s just a matter of building a parser & code generator that can convert this hypothetical syntactic sugar-code into C++.
Does this sound like a good idea, or a waste of time? Maybe something like this exists already?