Why doesn't Java have true multidimensional arrays?

前端 未结 6 1110
夕颜
夕颜 2020-12-05 06:57

The TL;DR version, for those who don\'t want the background, is the following specific question:

Question

Why doesn\'t Java have an implemen

6条回答
  •  春和景丽
    2020-12-05 07:25

    This should be a question to James Gosling, I suppose. The initial design of Java was about OOP and simplicity, not about speed.

    If you have a better idea of how multidimensional arrays should work, there are several ways of bringing it to life:

    1. Submit a JDK Enhancement Proposal.
    2. Develop a new JSR through Java Community Process.
    3. Propose a new Project.

    UPD. Of course, you are not the first to question the problems of Java arrays design.
    For instance, projects Sumatra and Panama would also benefit from true multidimensional arrays.

    "Arrays 2.0" is John Rose's talk on this subject at JVM Language Summit 2012.

提交回复
热议问题