C
C
cthulhudx2015-03-22 17:52:31
Java
cthulhudx, 2015-03-22 17:52:31

Why doesn't the Java language have such language constructs as "properties" and "indexers"?

Why are there no such language constructs as "properties" and "indexers" in the Java language? Their introduction will not complicate the language itself, but it will greatly simplify the work and make the code more beautiful. Where are Oracle looking?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
vlad20012, 2015-03-22
@cthulhudx

For the same reasons why there is no operator overloading in Java and a huge number of other goodies. Language designers don't like any syntactic sugar, and properties and indexers are syntactic sugar over simple methods.

V
Vapaamies, 2015-03-23
@vapaamies

Because Java wasn't made by Hejlsberg.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question