4 ms·
"Warning: You probably don't want to do this because it's unsupported and very hacky." The opening line should have stopped here. Dynamic data structures in un
by ppeetteerr 8y ago
"Warning: You probably don't want to do this because it's unsupported and very hacky."
The opening line should have stopped here. Dynamic data structures in untyped languages are risky, hard to debug, and prone to breaking One can argue that document stores (e.g. CouchDB and MangoDB) have been around for a while but their strength (and that of JSONField), is the ability to store hierarchy, not arbitrary structure (which they also do). A dynamic model like the one in the article serves as a database-stored deserializer, which is more of the domain of the business logic, rather than data.
Having said all this, the article is dope :o
- t-richards 8y ago>Dynamic data structures in untyped languages are risky What exactly do you mean by "untyped languages"? Python and every other high level language like it definitely has types. Maybe you meant "dynamically typed"?
- ppeetteerr 8y agoYeah, exactly.
- anonuser123456 8y ago'Dynamically typed' is a colloquial term for an untyped language.
- dangerbird2 8y agoIt's a snarl word for dynamically typed languages, to conflate strong, dynamic type systems like Python's with true untyped languages like Assembly, Forth, and BCPL.
- digitaLandscape 8y agoIt has types... which are rarely at runtime, when you typically just use an unchecked bag of key-value pairs. It's closer to getting a bag of bytes in assembly than it is to the behaviour you'd get in any actually-typed language. Nobody should be using such crap in 2018.