r/purescript • u/xanderai • Feb 10 '17
Is PureScript a Full JavaScript Replacement?
I'm not a web developer, so I'm not familiar with these things.
Is it currently possible to build a sophisticated front end entirely in PureScript? Essentially, a full replacement for needing to write JavaScript? I was speaking with a web developer who claimed that you'd likely have to write portions of your front end in basic JavaScript and then interact with it in PureScript. Is this the case?
9
Upvotes
View all comments
Show parent comment
2
u/[deleted] Feb 12 '17 edited Feb 12 '17
What is your point exactly? The question was "a full replacement for needing to write JavaScript". You already don't need to write javascript to create a web page frontend with purescript. Heck, with the new halogen-vdom and rollup-plugin-purs you don't need to use browserify. But anyway, using a tool written in javascript is not the same as writing javascript.
Thus, I don't see why you NEED to "learn Node" in any way. Unless you WANT to leverage existing javascript libraries, then you'd need to learn commonjs or other way to glue it all together.
And as for side effects, you'll find that for many things you can use existing purescript libraries along with Aff and the Eff monad. Only for a few things you'll need to use javascript through FFI. And that's how it will be for a long time, since browsers expose new APIs through javascript.