Re: Terminology: “non-method function”

Axel Rauschmayer axel at rauschma.de
Fri Apr 13 21:40:56 PDT 2012


> On Tue, Apr 10, 2012 at 4:01 PM, Axel Rauschmayer <axel at rauschma.de> 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.
> 
> Your combination 'don't have/use'  confuses me. A function declaration does not have a 'this', dynamic or not, but it can use 'this' and expect it to be bound dynamically. A function object created from the function declaration can have 'this', but only if it is bound, which in my understanding is therefore not dynamic. To me 'having a dynamic this' is an oxymoron: if you have it, then it ain't dynamic.
> 
> Can you un-confuse me?


I was thinking of the function’s “activation record” where a `this` field is part of the ExecutionContext.

Maybe a better way is to ask:
“What is a good term for functions that have no use for their own `this`, that want to access the `this` of their surrounding scope?”

I find human language tricky here...

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120414/bb62855d/attachment-0001.html>


More information about the es-discuss mailing list