keithamus / proposal-object-freeze-seal-syntax

A JavaScript TC39 proposal for Object.freeze & Object.seal syntax
https://www.keithcirkel.co.uk/object-freeze-seal-syntax
59 stars 8 forks source link

* for freeze (snowflake) #15

Closed goodwin64 closed 3 years ago

goodwin64 commented 6 years ago

As for me, * character fits better for freeze operation

const foo = {*
  a: {*
    b: {*
      c: {*
        d: {*
          e: [* "some string!" *]
        *}
      *}
    *}
  *}
*}
scf4 commented 6 years ago

This is much better. I also think {** ... } should deep-freeze.

SebastianSimon commented 3 years ago

Given that ({*x(){}}) is valid syntax now (creates an object with a generator method called x), this may be non-trivial to parse.

goodwin64 commented 3 years ago

And frozen generator will make code reading a hell 😈

Agree, closing