3 ms·
A request for the language gods
- mooism2 15y agoAvailable in Haskell with the ViewPatterns extension. http://haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#view-patterns http://haskell.org/ghc/docs/latest/html/users_guide/syntax-e...
- pavel_lishin 15y agoSeems like something you could do with decorators in python, but would probably end up looking more confusing than the original.
- ikevin 15y agoIf you are using Ruby you might be able to use some variation of the "around alias" mentioned here: http://media.pragprog.com/titles/ppmetr/spells.pdf http://media.pragprog.com/titles/ppmetr/spells.pdf Maybe even create your own little dsl for your approach.
- k33n 15y agoI love that it's under a section called "spells". And actually it looks like it could be done with a variation of this. This is why I love Ruby. It goes out of its way to let programmers be creative :)