On Wed, Nov 16, 2011 at 11:29, Andreas Rossberg <[email protected]> wrote:
> On 16 November 2011 20:12, Erik Arvidsson <[email protected]> wrote:
>> One thing that all of these discussions are missing is the hoisting
>> property of function and any possible future classes. If we use "let
>> Point = ..." we lose all hoisting and the order of your declarations
>> starts to matter and we will end up in the C mess where forward
>> references do not work.
>
> The order of let declarations does not matter for visibility. It is
> perfectly fine to forward reference let, as long as it does not
> immediately require the value. For example:
>
> let x = {f: function() { return y;}}
> let y = 5
>
> In particular, this enables mutually recursive let definitions.
Sorry for being too brief. Today the following works.
f();
...
function f() { ... }
but the following does not:
f();
...
let f = function f() {};
I think it is important that we keep the forward reference behavior
with classes. This requires a declarative way of defining classes.
--
erik
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss