|
Re: What's New in Scala 2.8: Named and Default Parameters
|
Posted: Sep 29, 2010 1:56 PM
|
|
Lou,
For me named parameters both add clarity and reduce noise:
1. As a developer of some API code I prefer to have one method with optional named parameters rather than several overloaded methods that delegates to each other.
2. As a user of some API I would prefer to type two-three short parameter names (or better yet have them all auto-suggested/completed by IDE) rather than select necessary method overload among 5-6 variants or type numerous nulls/zeros/empty-strings "default values" explicitly.
For opponents of named arguments I would suggest the following: a) Try to add a weak-referenced event listener in AS3 via IEventDispatcher.addEventListener b) Try to open a password-protected workbook in MS Excel VBA via Workbooks.Open
P.S. I never developed software for IBM mainframes, but I have some experience with SAP ABAP, so I pretend I may add a word on wordiness :)
|
|