5 ms·
But is it really Python if it doesn't have dictionaries? I'd argue No - they're the fundamental data structure of the language (like tables in Lua, arrays in F
by dublin 4y ago
But is it really Python if it doesn't have dictionaries? I'd argue No - they're the fundamental data structure of the language (like tables in Lua, arrays in FORTRAN, etc.).
Pikascript could be useful, but it seems to me it's either a castrated Python, or more positively, a minimalist embedded scripting environment with Python-like syntax. But it's not Python.
- sophacles 4y agoHow does python even work without dictionaries? This is one of those rare times I find the word `fundamental` to be a bit understated. I mean, a class is just fancy syntactic sugar around a dict.
- freedomben 4y agoI don't see how you could support dictionaries with only 4k of memory. They're awesomely convenient but not very space efficient. Normally that doesn't matter because there's plenty of memory, but in this case it makes a lot of sense. But yeah so much of the standard library relies on dictionaries, so it wouldn't feel very pythonic.
- throwaway892238 4y agohooray!
- packetlost 4y agoWhen you're dealing with low-level compiler tool-chains like this, it's more accurate to say they translate a subset of python syntax (or the AST) into a lower level language (either machine code, or an ASM), so the dependence on dictionaries as a implementation detail of classes/objects (or really anything else that relies on dict) isn't really there (some things may break, but that's because they rely on a particular CPython implementation detail). Well, outside of dicts themselves. Having worked with a similar system, it's really better to think of it like embedded C and write code imperatively (and no dict, just arrays/lists).
- zasdffaa 4y agoNot sure I could tell a castrated Python from an uncastrated Python except by the look on its face.
- deleted 4y ago[deleted]