I think whether your comment is essentially true or not depends on the language and technology.
Re:Why your F# evangelism isn't working
by somenameforme on Wednesday May 31, 2023 @02:02AM
(#36135023)
"Most" (I mean "all", but meh - I'm sure there's some obscure exception somewhere) parsers will have the ability to swap between a strict DTO interpretation of some data, and the raw underlying data which is generally going to be something like a map of maps that resolves to strings at the leaf nodes. Both have their uses. The same can also be done easily enough by hand as well, if necessary.
No, it's not.
You can write code in a statically typed language that treats the data as strings. The domain modelling is optional, just choose a level that you need:
1. String 2. JSON 3. MyDTO
If you do choose 3, then you can avoid serde errors using property based testing
Re:Why your F# evangelism isn't working
by FrustratedMonky on Wednesday May 31, 2023 @09:24AM
(#36138094)
Even with a Dynamic Type, it becomes real static type at some point when running, so why wait for the crash to happen at runtime?
You can also write code like
And it will just work so long as the object has those properties. In a statically typed language, you’d have to have a version for each object type or be sure to have a thoughtful common interface between them, which is hard.All that bring said, I generally prefer type safe static languages because that type system has saved my bacon on numerous occasions (it’s great at telling me I just changed something I use elsewhere).