Hacker News new | past | comments | ask | show | jobs | submit login

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.




Reminds me of Pascal Constanza's context-oriented programming stuff.


A better way of handling this is package-based rather than file-based.


I 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.




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

Search: