Why doesn't Java have method delegates?

后端 未结 9 1514
再見小時候
再見小時候 2021-02-05 17:42

The Java gurunaths (natha नाथ = sanskrit for deity-master-protector) at Sun should condescend to accept the necessity of delegates and draft it into Java spec.

In C#, I

9条回答
  •  被撕碎了的回忆
    2021-02-05 18:19

    Simplicity.

    By not introducing the concept of delegates into Java, they made the language simpler. Just like not having properties, indexers, ....

    (using a simpler language is not necessarily simpler by the way; probably they should have added delegates but that's not how they made the design decisions)

提交回复
热议问题