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

It would be fantastic if this kind of stuff was embraced by the CoffeeScript people and something like Erlang's parse transforms was implemented:

    # mycode.coffee:
    "use parse_transform('observers.coffee')"
    
    class Gradebook
        +observe scores
        gpa: ->
            sum(@scores)/@nGrades
Imagine the interesting (or perhaps chaotic) ecosystem that would develop if this kind of thing was encouraged?



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

Search: