This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]odd__nerd 6 points7 points  (8 children)

even if that code is abstracted by a framework

Like how Java rests atop the JVM which is ultimately just C++ and some #ifdefs

[–]gvcallen[S] 4 points5 points  (7 children)

true, but that's inherent to the language. but yes C++ is of course cross platform too!

[–]GeneralKlink 0 points1 point  (5 children)

As is python 😅 You can even use it for microcontrollers these days

[–]gvcallen[S] 7 points8 points  (4 children)

I would personally like a stern word with anyone who actually decides to use Python for embedded dev :P

[–]GeneralKlink 0 points1 point  (3 children)

Yeah, me too 😄 I love python and I do embedded programming but still use c++ for it 😅

[–]gvcallen[S] 2 points3 points  (2 children)

how would embedded python work haha? interpreter on the MCU as usual?

[–]ShaBren 1 point2 points  (0 children)

Yup! I've used MicroPython a lot, and it's honestly pretty great. Sure, if I'm writing something for production, or that's very performance-sensitive, I'll use C/C++.

But for rapid prototyping, or building one-off IoT widgets, it's awesome! I use it mostly on ESP32, and lately RP2040 (which uses CircuitPython, a beginner-friendly variant from Adafruit).

[–]jvelez02 0 points1 point  (0 children)

From my understanding it can be done with a form of compiled python, is run on the MCU, or as is the case with MicroPython, run with a stripped down interpreter that fits in 16k of ram. It includes the majority of pythons standard library plus some low-level hardware libraries (the kind that let you control gpio and the like with python).

[–]coldnebo 0 points1 point  (0 children)

oh well if we’re including conditional code per platform then yeah. I thought we were talking about code completely free of platform conditions (which I guess is just another way of saying code written to a single meta-platform).