Settings

Theme

Ask HN: Functional front-end?

4 points by bradcomp 10 years ago · 2 comments · 2 min read


I'm finally at a point where I can start work on a significant side-project, and I'm trying to determine my tech stack.

I'm using Haskell server-side, and I would like to build my front-end using functional techniques as well.

I've looked at PureScript, Elm, and Cycle.js as possibilities for building my client side code.

I'd like something that can integrate with other libraries in the Javascript ecosystem, and it would be nice to be able to use it for client side routing, ajax calls, etc.

PureScript is impressive, but it looks to have the steepest learning curve, and and the last time I tried it the toolchain was terrible (hopefully this is no longer the case).

Elm looks good too, but from what I can tell it doesn't really fit into the modern npm / bower / requirejs etc. ecosystem.

I like the philosophy behind Cycle.js, and of course interop wouldn't be a problem, but... it's still JavaScript. This isn't a huge deal, but it does count against it a bit. I use JS all day and it would be nice to have something typesafe, and closer to Haskell syntactically and semantically.

I'm open to other suggestions as well, I'm not trying to limit it to those three, but they at least give an idea of where my mind is. I would be especially interested in hearing from people who have used any of these (or others) to build web applications.

Thanks!

alphanumeric0 10 years ago

Hello,

I've been learning Elm for a few months and have done a few small side projects in it. I'm also currently in the process of learning PureScript.

I prefer the way Elm is structured around signals. PureScript does not seem to be structured this way by default, but there is at least one project written in PureScript that gives you Elm-style FRP.

Once my Elm projects became sufficiently advanced, I noticed I was looking to use higher-kinded types, which Elm does not seem to have yet, while PureScript does. This may be important to you.

purescript 10 years ago

I hope you find PureScript has improved considerably since you last looked, but if you have any specific issues, please drop into #purescript IRC and let us know.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection