r/purescript • u/DevOnHisJourney • Jun 11 '17
Using purescript frameworks from js?
I think purescript is really quite a special and powerful language. And with that power, I would expect the frameworks to be very worthy of developers consideration. However, maybe they don't have the time for everyone on the team to learn purescript, or they have some other qualms about adopting purescript.
I think halogen, pux, and thermite could experience some serious growth by opening the floodgates to the broader javascript community, which would more or less include people using other compile-to-js languages.
Maybe ironing out usage from js-land could lead to purescript driving certain es features towards standardization. It would really put the purescript ffi to the test.
I think this would have a beneficial effect for the entire purescript community. For one, it can give a ton of people a reason to start learning purescript: to be able to make changes to their framework.
Thoughts on how this might be best setup?
I can kind of read purescript. Could I possibly compile halogen to javascript, and then attempt to re-write the examples from the guide in javascript?
View all comments
Show parent comment
1
u/DevOnHisJourney Jun 11 '17
I would agree, using from plain un-typed js would defeat the a key premise of using purescript. To this end, I find flowtype to be a really amazing technology, and predict it's going to see a lot of adoption over the next 5 years. After all, if you aren't at least ensuring your js code doesn't have any runtime errors, I don't know what you're doing. And I think this is where it gets really interesting, when you combine es7 with flow and a purescript framework.
That then leaves the question of: are there any purescript concepts are sorely missing from the javascript world, which may be needed for a nice integration?