July TC39 meeting notes, day 2

Oliver Hunt oliver at apple.com
Thu Aug 4 15:15:46 PDT 2011


On Aug 4, 2011, at 2:29 PM, Brendan Eich wrote:
> 1. return allowed from constructor?
> ...
> Consensus is: RESOLVED, return disallowed from class constructor body.

What about return with no value -- there are cases where such early returns are useful, and you would not be allowed to specify your own value (eg. there's an implicit return of |this|).  Most class-oriented languages have this behaviour (C++, Java, C#, etc), those that don't support early returns, frequently don't support return-statements at all (eg. the various object-pascal dialects).

> 3. private variable use-syntax

My 2c:  i've always felt a prefix should be required to access a globally scoped variable/property in general, but no doubt people would complain about that degree of verbosity.  That said I'm unsure why there's such a desire to avoid standard scoping rules of every other language (where the properties of |this| are implicitly in scope), with a mechanism to disambiguate access to the global scope if necessary (As C++ does, although i'm not suggesting C++'s syntax).

--Oliver



More information about the es-discuss mailing list