3 ms·
Although the solution produces too many problems, I agree that named parameters are highly desirable for readability and the prevention of bugs. Have there been
by pathdependent 14y ago
Although the solution produces too many problems, I agree that named parameters are highly desirable for readability and the prevention of bugs. Have there been any proposals for Java 8 to included named parameters?
Edit:
* http://openjdk.java.net/jeps/118 http://openjdk.java.net/jeps/118 proposes run-time storing of parameter names -- not what is desired, but in the same ballpark.
* http://web.archiveorange.com/archive/v/bobySzLnuDWgr47zqwU9 http://web.archiveorange.com/archive/v/bobySzLnuDWgr47zqwU9 proposes named arguments for making clean code.
- bad_user 14y agoThe problem with named parameters is that suddenly method parameters become part of your exposed API. The other problem is that the compiler currently discards the parameter names, so older binaries are not going to be compatible.