Re:Dynamic Django Models with Model Models
by t-richards on Wednesday August 22, 2018 @08:50AM
(#17818309)
>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"?
Re:Dynamic Django Models with Model Models
by dangerbird2 on Wednesday August 22, 2018 @11:02AM
(#17819166)
It'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.
Re:Dynamic Django Models with Model Models
by digitaLandscape on Wednesday August 22, 2018 @11:32AM
(#17819405)
It 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.
Re:Dynamic Django Models with Model Models
by anonuser123456 on Wednesday August 22, 2018 @10:13AM
(#17818793)
'Dynamically typed' is a colloquial term for an untyped language.
Re:Dynamic Django Models with Model Models
by ppeetteerr on Wednesday August 22, 2018 @09:56AM
(#17818682)
Yeah, exactly.
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