关于MicroPython是否可以真正用在产品开发的讨论

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

这几天,在MicroPython官方论坛上,发起了关于MicroPython是否可以真正用在产品开发上(Is MicroPython ready for real world deployment)的讨论,非常有趣。我觉得值得大家看看,所以简单的翻译和整理了一下。

问:
If I wanted to deploy a large number of devices and have them run reliably, would MicroPython be a risky choice?
在设备上运行MicroPython是否可靠?

答:
We are using Micropython in several projects (medical & industrial certified measurement equipment) for ~2 years. It was a bold decision, but it already paid off.

有网友回答说:我们在多个项目中(医疗和工业测量认证设备)使用Micropython超高2年了。这是一个大胆的决定,但是它已经得到了回报。


坏处:

  • 提升了硬件资源需求
  • 缺乏面向对象的编程技能


好处

  • 开发效率
  • 可追溯性
  • 可测试性
  • 可移植性
  • 许可和支持(开源)



问:
don't the other benefits  exist for C/C++ (with or without an widely used OS/RTOS) ? e.g. clang or gcc, FreeRTOS, etc?
是否有其他类似C/C++的功能?如 clang或gcc、FreeRTOS等

答:
MPY outperforms all the tools we know (even the ones we can't afford) for our application portfolio and a broad range of different MCU types. We came to MPY while searching for a lightweight python implementation for a linux based system to get rid of bloated shell scripts. 
对我们的应用程序以及广泛的不同的单片机类型,MPY优于我们知道的所有工具(甚至包括买不起的)。我们为了摆脱臃肿的shell脚本,在寻找基于linux系统的轻量级的python时发现了MPY。


For this first project it ended up with getting rid of linux replacing it with MPY. Two years later we cover ultra low power systems (consuming 500nA with active REPL!) to real-time image processing, all with just one development and runtime environment.
对于第一个项目最终用MPY取代了linux。两年后我们实现了超低功耗系统(包括REPL仅消耗500 nA)进行实时图像处理,使用同一个开发和运行环境。

I'd say problems with the uPy side of things are extremely rare and the API is also very stable, and even if there is a bug or feature missing the fix takes a couple of days at most (either fix by main devs or time to get PR merged).
对于uPy我想说的是问题非常少和API也非常稳定。即使发现了一个bug或功能缺失,修复也最多需要几天(包括主要开发者修复和PR合并时间)

Frankly I don't think there are many other scripting language implementations out there that work as good for the pros mentioned by chuckbook already.
坦率地说,我不认为还有其他脚本语言可以像chuckbook提到的一样好。

Lua is ok but it's not Python. CPython works but good luck getting it to compile on non-pc or embedded pc hardware. Or trying to understand the code. C and C++ are tried and tested and pretty awesome if yo know how to use them properly, but are not scripting languages at all.
Lua不错但不如Python。CPython可以使用,但是需要在个人计算机或嵌入式pc硬件上编译、理解代码。C和C++久经考验,非常不错,但是你需要知道如何正确地使用它们。
 

转载于:https://my.oschina.net/shaoziyang/blog/853915

你可能感兴趣的:(python,shell,c/c++)