News for hackers. Stuff that matters.
Re:Named Parameters in Java by Aykroyd on Friday August 10, 2012 @10:28AM (#4366288)
That would definitely be a nicer way to do it. Although, using the builder pattern to create parameters for every single method in your API would be a gigantic pain.

Javascript APIs hack this in by taking Objects as params so that you can do {name='Alfred E. Neuman'...}. Unfortunately, Java's syntax isn't nice for creating Maps either, but maybe you could do something with that.

In the end, this seems like a problem with the language syntax and any fix other than one at the language level is going to be a hack.

There are no comments on this comment yet.