3 ms·
The first feature that really jumped out at me were the scoped mixins. From the docs: You can swap out mixins for the span of a single source file. Example: yo
by arockwell 18y ago
The first feature that really jumped out at me were the scoped mixins. From the docs:
You can swap out mixins for the span of a single source file. Example: you could give all strings a "backwards" method. But just for the code inside your test.pn script.
This would let you monkey patch in a safer fashion.
- wingo 18y agoReminds me of Pascal Constanza's context-oriented programming stuff.
- omouse 18y agoA better way of handling this is package-based rather than file-based.
- arockwell 18y agoI think you can perform the scoping in a very fine-grained fashion, because the docs also say: You can re-mix for the span of a single closure. I wish there was an example in the docs I could post of this in action, because I'm curious about how this works.