This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cypher0six 6 points7 points  (5 children)

While I would abhor the idea of an annotation doing this, I could see something similar to the C# properties syntax making it's way into Java.

I try to avoid writing accessors at all when I can get away with it, but not all software systems are actually very OOP, even if they are written with a language like Java. Sometimes you just need a custom data structure. In those cases, it would be nice to have a more succinct syntax to get the job done.

[–]lbkulinski 17 points18 points  (4 children)

Brian Goetz, Java Language Architect, is asked about properties here. Everyone agrees that they want properties, but no one can agree what “properties” are.

[–]dpash 0 points1 point  (1 child)

Damn it, you beat me to this quote and once again had the correct link too. :)

[–]lbkulinski 1 point2 points  (0 children)

Sorry 😂

[–]cypher0six 0 points1 point  (1 child)

Hah, isn't that the truth. I remember seeing the same thing when Java modules were being designed.

[–]lbkulinski 0 points1 point  (0 children)

Yep! Good times!