On Wednesday, April 11, 2012 at 6:37 AM, 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?
>  
> 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.

This is actually how most JS devs, that I regularly speak with, describe the 
functions you're describing: constructor, bound/unbound function, method.

  
>  
> > FunctionDeclarations and FunctionExpressions may be used to define either 
> > methods or functions.
> > Arrow Function expression only define functions
> > Concise method definitions in object literals and class definitions may 
> > define either methods or functions
> >  
> > It's messy, but emphasizes that the important thing is what the function 
> > depends upon rather than which syntactic form was used to define it.
> >  
> > Allen
> >  
> >  
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss@mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
> >  
>  
>  
> --
> Alex Russell
> slightly...@google.com
> slightly...@chromium.org
> a...@dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
>  
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>  
>  


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to