DrBoolean / pointfree-fantasy

Point free wrappers for fantasy land
450 stars 25 forks source link

either.js missing #5

Open syzer opened 10 years ago

syzer commented 10 years ago

Can you add either to instances? you have it in patterns_talk

BTW: +1 for pointfree

DrBoolean commented 10 years ago

I shall. In the meantime, I've been using folktale's data.either. I dig it very much.

For the most up-to-date stuff checkout: https://github.com/DrBoolean/hardcorejs/blob/master/demos/step4/flickr.js which uses: http://looprecur.com/hostedjs/v2/hcjs.js

DrBoolean commented 10 years ago

Should mention, we just threw things in there to reduce complexity for the class. But it's got most of what we use in client work as deps

syzer commented 10 years ago

https://github.com/DrBoolean/hardcorejs/blob/master/demos/step4/flickr.js ramda is still to hardcore for me :) why not wu?

one comment on style: var _PictureBox ...

instead privates with AKA the blind-man oath: "I pretend not to see and call code with "

one might return object/function wich exposes wanted api and push all _functions to closure , so they are really private

DrBoolean commented 10 years ago

ha nice. ramda and lambdajs expose a really nice curried api for doing pointfree stuff. Alternatively, lodash's chain and standard fantasyland api's turn into a scala-like approach.

I tend to gravitate toward pointfree, but i'm crazy like that.

The _ convention is totally lame. I typically do hide it and just expose the constructor, but in the class we used that convention throughout to flag the type vs the constructor so we could avoid using new while practicing implementing the typeclass interfaces.

syzer commented 10 years ago

+1