Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's better than the alternative too.

You always have some concept of the API leak into the consumer. You either remember explicit names, or remember their positional pseudo-names 'first', 'second', 'third' etc. Unnamed arguments bring up more issues such as ordering consistency (see: PHP's many notorious cases), deprecation leaving 'holes' in argument lists, etc.

In Perl and many other languages we just provide a hash (aka dict) of key/value pairs. This lets the functions decide how to handle breaking changes which involves some annoying boilerplate but overall works fairly well. It's nicer with proper language support though.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: