Re:Let the Type System do the Work
by hcarvalhoalves on Monday April 21, 2014 @02:40PM
(#7622798)
Named arguments is syntatic sugar for packing/unpacking data structures in some languages, so you can leverage that. In Python:
The order arguments are passed doesn't matter anymore. You can also enforce this calling convention with a constructor signature like this (in 3):
[ Parent
| on HN ]
i agree that in languages without compiler defined types, but with other tools such as named arguments, the class of errors described here can be to some extent avoided by making good use of named arguments. I'm gonna do this more often in my python code!