News for hackers. Stuff that matters.
Re:Immutable Data Structures That Are Compatible with Normal... by zdragnar on Saturday August 12, 2017 @08:06PM (#15000771)
Most libraries have flags for an environment variable to skip freezing in "production" mode; any decent minifier will remove the conditions since they can't be reached, so there's no performance penalty.

Tcomb does this, and is far and away one of my favorite JS libraries for all of the other features it provides as a result.

Edit: to be clear, tcomb provides runtime types, algebraic data concepts, pattern matching, validation, and with plugins react form generation and other things. Immutability is a simple consequence of needing to guarantee a valid value stays valid; it's not so much a "feature" per se

There are no comments on this comment yet.