Angus Croll wrote:


On Sat, Apr 21, 2012 at 1:56 PM, Axel Rauschmayer <[email protected]
<mailto:[email protected]>> wrote:

    Counter-question: Isn’t it clear when you create a function whether
    it is going to be a non-method function or a method?


It's clear to the implementer - Its not clear to a function that gets it
as an argument - unless fn.prototype is checked

How is this different from checking the type of an argument? There are people who feel "safer" when the language checks the type for them. Then there is different school preferring dynamic typing (Smalltalk, Self, JS, ...), where the caller is to blame when it passes different type (and if the code must be foolproof, it should check somehow).

Do you always check all the argument if they are really numbers, strings, objects of concete type you want to get? I'd bet you don't.

This is the same.

Herby
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to