Re:Python is two languages now, and that's great
by vips7L on Monday February 27, 2023 @12:23PM
(#34959193)
I don’t see how declaring a data model class is anymore difficult in Java than another typed language.
The only way I could see this being easier is to forgo type safety completely.
[ Parent
| on HN ]
Re:Python is two languages now, and that's great
by eropple on Monday February 27, 2023 @01:55PM
(#34960427)
You're assuming you only have to define it in one language. JSON is an interchange format. The canonical way to express it is JSON Schema, and the tools are unpleasant in Java. So is dealing with structural typing of polymorphic responses. In an ideal world we wouldn't have those, but we live in this one.
These things are just better when you aren't in a nominatively typed language with some pretty crusty assumptions.