3 ms·
The MicroPython interpreter is very robust and well tested. We test our devices extensively. You need to pay attention to gc performance, memory use and fragmen
by matt_trentini 4y ago
The MicroPython interpreter is very robust and well tested. We test our devices extensively. You need to pay attention to gc performance, memory use and fragmentation but this isn't our first rodeo!
Systems are typically fragile because of poor system design not language choice. I've worked on many C and C++ systems and there's nothing inherently more robust about them. Some would argue that the various ways you can trip over UB makes them more fragile...
- IshKebab 4y ago> 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!
- ok_dad 4y agoBashing 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.
- IshKebab 4y agoSure, 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.
- ok_dad 4y agoPlease 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.
- IshKebab 4y agoI'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.
- SOLAR_FIELDS 4y ago> 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.