archives

« Bugzilla Issues Index

#3265 — 19.2.3.2 Function.prototype.bind: Drop "bound" prefix for already bound functions?


19.2.3.2 Function.prototype.bind ( thisArg , ...args)

`(function f(){}).bind().bind().bind().name` currently returns "bound bound bound f". Maybe it should just return "bound f" instead? From a usability point of view, repeating "bound" for every bound function level seems rather distracting.

There are some open issues here, like should "bound" only be dropped if the target name already starts with "bound" or should it be dropped for all bound functions, etc. ?


I don't see why the extra "bound"s are an issue. This is primarily used for debugging and the fact that a function has been bound multiple times may be useful debugging information.

May be you should bring this up on es-discuss and see if anybody else has strong opinions of this.