2
Crazed
7y

Doing node dev with a friend that never used JS before

He asks about how to make enums for our generic model to use

Good question I think, I'm not sure

Apparently you just make a fucking object and freeze it, go figure with JS

"Wow. I bet that's super fast /s"

Dammit JS you patchwork ass language, I love you but I see why classic language developers are turned off

Comments
  • 0
    Read about es6/es next additions

    You might find what you want
  • 0
    @benderRodriguez I don't personally have a problem with creating a const object and freezing it. That's essentially what things like enumify do anyway, with a couple extra steps that may or may not improve performance lol.

    It's more so shock going from C++ to JS for my friend and having everything basically just held together with duct tape.
Add Comment