News for hackers. Stuff that matters.
Re:Javascript: is 'this' a code smell? by shubber on Thursday November 04, 2010 @10:22PM (#1871737)
Both Python and Lua share this characteristic with Javascript. Is there a name for this language feature, or for languages that share it?

I tend to think of them as "bag-of-things" languages, since they also all share the fact that objects are just tables/dictionaries, and the only thing that distinguishes an attribute reference from a method call is the "()" at the end. Certainly there's a more accepted nomenclature?

Re:Javascript: is 'this' a code smell? by cheald on Saturday November 06, 2010 @11:13AM (#1877025)
What you're terming "bag-of-things" languages can probably be more aptly described as languages which have both dict/tables/objects and first-class functions.

While there isn't really a term (that I'm aware of) specifically for the this/self convention, both are idiomatic examples of dynamic scoping (compared to lexical scoping); that is, scope is determined at runtime by the most recent stack frame to define a given variable (ie, foo defines "this", then calls "bar", bar sees "this" as it was defined by foo), rather than at lex time.

Re:Javascript: is 'this' a code smell? by shubber on Tuesday November 16, 2010 @02:13PM (#1911200)
While there's a correlation between dynamic scoping and explicit "this", it isn't universal: Ruby being the obvious exception.
Re:Javascript: is 'this' a code smell? by silentbicycle on Thursday November 04, 2010 @11:03PM (#1871843)
> Certainly there's a more accepted nomenclature?

I don't know if there is, but there should be.

The defining aspect seems to be that there aren't pure ADTs, just collections based an associative arrays ("dicts" / "tables"), and methods are just table fields that contain a function. Also, Python has classes where Lua really does just have pure tables with hooks ("metatables", which make it easy to implement prototypes, classes, and many other constructs).