Link Details

Link 54921 thumbnail
User 111696 avatar

By bloid
via blogs.sun.com
Published: Nov 29 2007 / 17:21

Some developers like the constructor with positional arguments because it clearly documents the intent of the class. Others feel that keyword arguments, along with RDoc, make the code more clear than depending on argument ordering to convey meaning. Comparing the two types of method invocations, I have to agree that the hash seems easier to read.
  • 7
  • 0
  • 1577
  • 422

Comments

Add your comment
User 201685 avatar

lnguyen replied ago:

0 votes Vote down Vote up Reply

Maybe I'm just so use to Java, but I prefer explicitly providing arguments in my constructors so the code explains itself (with good comments too!)

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (7)



Voters Against This Link (0)