|
|
|
|
|
by axod
6072 days ago
|
|
Go on then... as I asked in another thread and you didn't reply, list out a few advances in the field of programming in the last 5 years. Should we make CPU makers update their machine code as well every year or so to integrate all these programming discoveries? |
|
If you want to do this in Java, you would have to create a class like:
This is a lot of code to write, which is why people just cut-n-paste instead.Also, Java is not merely 5 years behind, so it is worthwhile to look back farther to find ideas that Java could embrace. Java would do well to steal a sane object system like CLOS or Moose; it could really eliminate a lot of boilerplate. (One thing I think is annoying about Java is how much work the constructor has to do. In Lisp and Perl, I never write my own constructors, the object system does it for me. This means that things can be composed without the programmer having to know every detail, including which position each attribute initializer should be in.)
Anyway, if you really think Java is the state of the art, you should look around a bit more. Yes, it's silly that people want to do their own type checking in "dynamic languages", but that's not why they use them -- it's all the other features that they want. The lack of static type checking is an unfortunate overreaction to C and C++.