brakmic / purescript-redux

:alien: Redux Bindings for PureScript
MIT License
36 stars 9 forks source link

Why strings? #2

Open jasonzoladz opened 8 years ago

jasonzoladz commented 8 years ago

Redux doesn't require that your actions must be an object of the form { type : 'STRING_ACTION' }. Why did you choose not to employ an ADT instead?

Btw, I'd like to see this library grow. Please let me know if there's anything I can do.

brakmic commented 8 years ago

Hi @jasonzoladz

There's no explicit reason why I used strings. A few months ago I started to learn PureScript. And Redux, among my other PS-Projects, was one of the 'Playgrounds' I used to learn the language.

Sure, ADTs are much better and more idiomatic anyway.

I never thought this small project would be of any value to others as Redux already has a great community and the people there are building remarkable things with JavaScript.

I'm not saying that this wouldn't be possible with PureScript, quite the contrary. But the fact is that React, Flux, Redux and all the other stuff is JavaScript-by-default.

However, if you'd like to work on these bindings for PS I welcome you and would be glad to incorporate your pull-requests. :+1:

Kind regards,

jasonzoladz commented 8 years ago

So I wanted to move away from redux as it seems like a specialization of the more general RxJS. Here's an implementation using RxJS (with ADTs for Actions and Effects): https://github.com/jasonzoladz/purescript-rx-state

brakmic commented 8 years ago

Thanks.