Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You might want that, I might too. But it’s outside the constraints set by the post/author. They want to establish immutable semantics with unmodified TypeScript, which doesn’t have any effect on the semantics of assignment or built in prototypes.


Well said. (I too want that.) I found my first reaction to `MutableArray` was "why not make it a persistent array‽"

Then took a moment to tame my disappointment and realized that the author only wants immutability checking by the typescript compiler (delineated mutation) not to change the design of their programs. A fine choice in itself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: