Block lambda is cool, its syntax isn't

Claus Reinke claus.reinke at talk21.com
Fri Jan 20 01:08:19 PST 2012


> But notice that throughout this, no one advancing a proposal advocated
> freezing by default. JS developers use function objects as mutable 
> objects. Not just to set .prototype, also to decorate with ad-hoc and 
> meta-data properties. Freezing is not wanted by default.

Another example: when defining parser combinators, I've re-defined
.toString, to make it easier to identify the parser combination in question
during debugging.

This would be less of an issue if core JS operations weren't biased
towards mutation. If it was easy to create modified function objects
without in-place mutation, freezing functions would be more acceptable.

Claus
 



More information about the es-discuss mailing list