Plug and Play All Your Observable Streams With Cycle.js
medium.com
medium.com
[1] Blog post about this: http://underscore.io/blog/posts/2015/04/28/monadic-io-lazine...
this, uh, doesn't seem to match my normal understanding of JS. Normally the method to reuse code is to change what 'this' refers to, but the statement above implies the existence of 'this' is a failure of JavaScript's design. I would like some elaboration.
If you use an OOP style (with classes and inheritance), then you end up needing to use the 'this' keyword. If you use a functional style, you don't.
Is the functional style better? Does it let you write more reusable code, and avoid tightly coupling it to date? Eh...maybe. If you like that style, you'll probably be more productive that way (and be intrigued by Cycle.js). If you don't like that style, you won't be.
Also:
> the statement above implies the existence of 'this' is a failure of JavaScript's design
It's certainly been a pain point, and there's a lot of confusion and debate over classes, prototypes, constructors, the this keyword, figuring out what 'this` even refers to at any given point, the 'new' keyword, etc. I'm not sure I'd agree that the existence of the 'this' keyword is a mistake (and I doubt the people behind Cycle.js would either), but I don't think it's controversial to note that you can avoid a lot of confusion and sidestep the whole thing, if you are of a mind, by just using plain functions returning objects as needed.
Never seen that before; +1 for medium.com