News for hackers. Stuff that matters.
Re:MicroPython – Python for Microcontrollers by IshKebab on Wednesday June 08, 2022 @11:49AM (#31669161)
> Some would argue that the various ways you can trip over UB makes them more fragile

That is definitely a factor! But I probably wouldn't pick C++ for a medical device now anyway - I would go with Ada or Rust.

> Systems are typically fragile because of poor system design not language choice.

Poor system design and language choice are both factors. You can work around language choice with a shit load of testing, but it's still much better to use a language that gives you stronger guarantees. Also the choice of language affects system design, so it's not like you can just ignore it.

For example even ignoring anything memory related, Rust's borrowing system pushes you towards code that has fewer bugs. Python... well, not so much!

Re:MicroPython – Python for Microcontrollers by ok_dad on Wednesday June 08, 2022 @04:15PM (#31673369)
Bashing Python, or language-bashing in general, makes you sound like an immature and unprofessional programmer. Python is perfectly fine when used in the proper way by a knowledgeable professional, and Rust can be a dangerous tool when used by a beginner. It takes the knowledge of a tool to use it properly and safely; just because someone hit themselves on the head with a hammer doesn't mean hammers are inferior to nail guns and unsafe, they still have their uses in several areas where nail guns aren't the best choice.
Re:MicroPython – Python for Microcontrollers by IshKebab on Wednesday June 08, 2022 @05:22PM (#31674408)
Sure, Python has its place. But that place is not where you need the software to work extremely reliably.

If pointing out relevant and real differences between languages counts as "bashing" then I'm not sure how you are meant to discuss it.

Language choice does have an effect on program robustness. That's just a fact. And it's also pretty indisputable that Python lacks many features that help to write robust code.

Pretending that isn't true is immature and unprofessional.

It has some pros of course - having a REPL is good for experimentation, and it has a great library ecosystem for example. But neither of those are particularly important for commercial medical devices.

Re:MicroPython – Python for Microcontrollers by ok_dad on Wednesday June 08, 2022 @05:42PM (#31674697)
Please explain what you think is important about commercial medical devices, because having worked in the industry I can tell you the FDA is the hurdle and it's going to be as hard to convince them that C or Rust or Ada is safe to use for a medical device as it would be to convince them that Python was safe, and in the process you will certainly be ensuring there are safety controls for each item on the software FMEA, whatever your chosen ecosystem.
Re:MicroPython – Python for Microcontrollers by IshKebab on Thursday June 09, 2022 @11:54AM (#31682785)
I'm talking about actually making reliably devices, not just satisfying regulations.

> Please explain what you think is important about commercial medical devices

I'm not exactly sure what you're asking here. Medical devices are often safety critical. They need to work extremely reliably. That's obvious; I think I must have misunderstood your question sorry.

Re:MicroPython – Python for Microcontrollers by SOLAR_FIELDS on Friday June 10, 2022 @08:15PM (#31700748)
> That is definitely a factor! But I probably wouldn't pick C++ for a medical device now anyway - I would go with Ada or Rust.

I would like to as well, but that is very much not an option in most hardware projects at the time of writing of this comment. The ecosystem for these kinds of projects as a business in hardware is just too young to make it reliable enough to be shipping in a reasonable amount of time. Currently you really have very few choices in mainstream embedded programming for languages in a generic sense. You either work in c or c++, or you use micropython - and even micropython is young enough to invite some skepticism. No other ecosystem rivals these, though I do look forward to some promising commercial embedded Rust projects in the next few years.