I was hoping for something roughly like

   let lhs = rhs; statements
       // non-recursive, scope is statements

   let { declarations }; statements        // recursive, scope is
declarations and statements

Problem is that you need mutual recursion between different binding forms, not just 'let' itself.

Leaving legacy var/function out of it, is there a problem with
allowing mutually recursive new declaration forms in there?

   let { // group of mutually recursive bindings

       [x,y] = [42,Math.PI]; // initialization, not assignment

       even(n) { .. odd(n-1) .. } // using short method form
       odd(n) { .. even(n-1) .. } // for non-hoisting functions

       class X { .. }
       class C extends S { .. new X( odd(x) ) .. }
       class S { }
   };
   if (even(2)) console.log(  new C() );

Or did I misunderstand your objection?
Claus

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to