Re: Terminology: “non-method function”

Axel Rauschmayer axel at
Wed Apr 11 05:58:38 PDT 2012

On Apr 11, 2012, at 12:37 , Alex Russell wrote:

> On Apr 11, 2012, at 1:02 AM, Allen Wirfs-Brock wrote:
>> On Apr 10, 2012, at 4:01 PM, Axel Rauschmayer wrote:
>>> What is a good term for functions that don’t have/use dynamic `this`? “Non-method function” defines them by what they aren’t, I would like a positive definition. I’ve considered the term “pure function”, but the adjective “pure” is already heavily overloaded, especially in functional programming.
>>> Any ideas?
>> How about:
>> procedure - call "callable" object
>> method - a procedure that has a dynamic this (or super) dependency
>> function - a procedure that does not have a dynamic this dependency
>> detached method - a method that has not been associated with an object via Object.defineMethod
> What in the world would "defineMethod" do?

For `super` to work, a function needs a reference to the object that it is stored in. In the current object literal proposal [1], an object literal does it for you. If you don’t use an object literal, you need defineMethod.

> The confusing nature of the word "method" seems not to be cleared up by this. How about "bound" and "unbound" functions? Their iterability might bump them into "method" category if bound, but I think that's still just going to confuse non-JS folk.

I would make the following distinction:
#1 Intended use: non-method (callback? subroutine?) versus method.
#2 Implementation technique: bound function versus unbound function. will shield you from the fact that you have to bind functions for them to work as expected as callbacks. I’m looking for a term that explains non-methods at #1 to people who are not familiar with JavaScript.


Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list