News for hackers. Stuff that matters.
Re:Show HN: Aspect-oriented mixins in JavaScript by drostie on Tuesday January 12, 2016 @10:05AM (#10887772)
Very cool. I'm very interested to see what you'll build with it.

With any cross-cutting abstraction like this, it's kind of like developing a new potting soil: I feel like I need to know what flowers you're trying to grow to understand why you made the choices you made.

Re:Show HN: Aspect-oriented mixins in JavaScript by yangmillstheory on Tuesday January 12, 2016 @10:46AM (#10888050)
Thanks. I was writing an application that had unrelated components that all acted like view models.

I looked at existing mixin libraries, but found some that either injected themselves into the prototype chain or patched Function.prototype to let mixees customize behavior. I didn't like that, so I thought of this approach.

The rest has been a continuous process of simplification, but I never got back to writing that old application :).

Re:Show HN: Aspect-oriented mixins in JavaScript by own3r on Tuesday January 12, 2016 @09:19AM (#10887508)
Nice idea! Here's an alternative which uses ES2016 decorators https://github.com/mgechev/aspect.js
Re:Show HN: Aspect-oriented mixins in JavaScript by yangmillstheory on Tuesday January 12, 2016 @09:47AM (#10887668)
Thanks for sharing! Have you studied aspect-oriented programming formally?

I used the term "aspect-oriented" because a co-worker mentioned it and it seemed appropriate, but I don't have a deep understanding of that philosophy.

I'll take a look at your code, blog posts, and videos later when I get out of work. :)

Re:Show HN: Aspect-oriented mixins in JavaScript by bricss on Wednesday January 13, 2016 @02:33PM (#10896827)
It's everything but AOP
Re:Show HN: Aspect-oriented mixins in JavaScript by yangmillstheory on Wednesday January 13, 2016 @02:41PM (#10896896)
yeah, i should probably change that tonight