4 ms·
MicroPython is a subset of Python intended for resource-constrained embedded devices, unlike Gravity which is designed to be embedded in applications. This is a
by bakery2k 8y ago
MicroPython is a subset of Python intended for resource-constrained embedded devices, unlike Gravity which is designed to be embedded in applications. This is a significant difference - a while back I considered embedding MicroPython in an application (the Lua/Gravity/Wren scenario), but the Python programmers I discussed this with generally disliked the idea.
It seems those who already know Python want either the whole Python language, or not Python at all. I guess it's easier to learn a whole new language, than to use a language you already know but where some parts are suddenly off-limits?
- stinos 8y agoIt seems those who already know Python want either the whole Python language, or not Python at all Depends on whom you ask I guess. The subset implemented is fairly big imo. Maybe I just got lucky but I never really missed something, and looking at the list of differences [1] that might be because most of them are rather obscure/fancy features which I usually tend to avoid anyway or don't even know exist (multiple inheritance, attributes for functions just to name some) or else can be worked around. [1] http://docs.micropython.org/en/latest/pyboard/genrst/index.html# http://docs.micropython.org/en/latest/pyboard/genrst/index.h...
- int_19h 8y agoYou might not use those features directly, but they're often used in library code. For example, attributes on functions are common technique for function decorators to store some associated data.
- stinos 8y agoFair point. Porting existing libraries is usually a bit of a struggle. Luckily for the particlar applications we use we get along just fine with the standard library subset, everything else is a mix of custom C++ and Python modules.