Recently JavaScript alternative language is hot. Temporarily, CoffeeScript typified by CoffeeScript, which was able to omit troublesome writing in JavaScript, was popular, but recently typing like TypeScript is popular.
PureScript that I introduce this time is also one such JavaScript substitution, and it is close to Haskell as a code.
How to use PureScript
The PureScript code will be on the left and the result will be on the right. I understand it is quite distinctive.
In the playground you can also edit on the spot.
An object called phoneBook is specified as having a string type Name. Then search phoneBook and display it in the result.
It is iterative processing.
The PureScript notation is far from JavaScript and it is close to the S expression. Since it is about outputting JavaScript code when compiling it, it may be said that it is different. It seems interesting to be able to write more robust JavaScript by typing.
PureScript is Haskell's open source software (BSD License).
No comments:
Post a Comment