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

What would the ideal language return for your function call foo('bar'). It would seem to me that missing an argument should return some sort of notice, like in the case where someone else is using it.


I prefer Javascript for example: JQuery's calling conventions would not be possible if function args were mandatory.


I'm curious as what PHP couldn't do? You have default argument values and you can pass more arguments to any function. Seems that covers all the cases.


You can always use func_get_args() if you truly want it that way.


Or you could just use a real programming language that has some kind of design.




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

Search: