4 ms·
At a first browse, this looks incredibly cursed. Compiling C# to native code is almost antithetical to everything C# stands for. I love it. Cursed programming
by calamari4065 3y ago
At a first browse, this looks incredibly cursed. Compiling C# to native code is almost antithetical to everything C# stands for.
I love it. Cursed programming abominations are one of my favorite things to poke at.
I'd be extremely interested to see how the output binary compares to that of an equivalent C++ program. If the performance and code size optimization is anywhere close, we're just a few steps away from C# on microcontrollers.
Whether or not that's a good idea remains to be seen. It sure would be cool though.
- ClumsyPilot 3y ago> If the performance and code size optimization is anywhere close, we're just a few steps away from C# on microcontrollers My short fooray into Microcontrollers has shown that all the software development experience for them is absolute garbage. The quality of IDE's is terrible, the quality of libraries is terrible, portability of libraries is terrible, community support and hope of finding existing library for some sensor is low, etc. The actual programming language is only a small part of the problem. So if we just replaced C++ with C# nothing would change. But actually it would. Because expectations of developers of C#/Python/JS are different, they are not used to C hell of managing individual registers. They want libraries that actually work, their culture is that libraries should be portable. So it would require a different attitude to work. It would force a different attitude.
- pjmlp 3y agoIt is quite enjoyable, https://www.wildernesslabs.co/ https://www.wildernesslabs.co/ Same applies to other compiled toolchains for embedded, even Pascal and BASIC. https://www.mikroe.com/mikropascal-avr https://www.mikroe.com/mikropascal-avr https://www.mikroe.com/mikrobasic-avr https://www.mikroe.com/mikrobasic-avr It has been a matter of attitude since C went mainstream.
- calamari4065 3y agoReally all of your complaints apply equally to all domains of programming. Windows development is awful, Linux development is awful, web is awful, backend is awful. Bad libraries and bad APIs are universal and there is no escaping it no matter what domain you work in. Overall you really seem to not have a clue what you're talking about. If you use real grownup tools, the experience of developing firmware is not any different from any other domain. With the obvious exception of debugging being more difficult. Arduino and everything involved with that ecosystem is trash. Good libraries are available. Good drivers exist. If you simply leave the arena of arduino trash libraries you end up in a world that looks extremely similar to the rest of the OSS world. Quality varies of course, but you'd be a fool to think that no one in the entire industry writes good code. Besides that, writing a driver is usually a very trivial thing to do. I always write my own, and in the majority of cases it's simply copying registers from the datasheet into a nice C structure. It takes like an hour. And your core argument is plainly wrong. If the language didn't matter, we'd still be writing straight C, if not direct assembly. Every embedded environment I've seen supports C++. Some even support the standard libraries. Rust is also becoming quite popular for embedded. But clearly there's no reason or use for that, right? I mean, if the language doesn't matter, why aren't we still writing COBOL? Why does any language higher than C exist at all? And no, I don't think C# on a microcontroller would be practical. I want to see it because I think it'd be funny, precisely because it's so inappropriate. >My short fooray into Microcontrollers has shown that all the software development experience for them is absolute garbage. Read: I don't know anything about this industry, but I'm still gonna tell you it's all trash. I'm not sure it's a very smart idea to attempt to dunk on something you admit you know very little about.
- ClumsyPilot 3y agohey, i was upfront that my commend could be wrong. However, software is typically not portable between different bdands, and the avaliability of libraries is not the same as desktop / web development, it is significantly behind?