Hacker News new | past | comments | ask | show | jobs | submit login

Is it though?

Why not just use code (generated if required) to read xml or json for each class? That way it is clear, in the source code and can perform other transformations as required.




> Is it though?

Yes. It's what the Java world was before annotations became a thing.

> Why not just use code (generated if required) to read xml or json for each class?

Because it didn't happen that way, because Java is way too verbose for that, and because "imperative declarations" are a horrible thing.


You're describing what was, not what could have been. There's nothing to preclude just having a function on your classes to read from json or db data.

Perhaps the culture is stronger than the language though.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: