Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I believe object-orientation is dated

Name: Anonymous 2012-05-06 2:07

I don't know how many advances might be happening recently on some underground Smalltalk mailing-list, but in general, OOP has remained the same for decades.

Does everybody think it's good enough? Does nobody want new features that will make your code more expressive somehow? Watcha think?

Name: Anonymous 2012-05-12 13:27

>>35
There is a problem with that, sometimes you need the result, sometimes you need the object again. Take .pop(), suppose you want to write (for whatever reason):

var foo = bar
    .pop()
    .pop()
    .pop();

...to end up with the 3rd last item in an array?

There is a clever solution: katy.js provides K and T combinators on the object and return value. I have used it, it's incredibly convenient if you ever need it. Since it's a mixin you don't need to write protos especially for it and it works on the standard ones as well.

https://github.com/raganwald/Katy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List