6 ms·
PureScript
- GhotiFish 13y agoThis is a bit like Fay, is it not? I'm not skilled enough in either languages to cite the differences, though pureScript does not seem like it's strictly adhering to haskell syntax.
- paf31 13y agoThere are some similarities, yes. There's a good discussion of the differences here: http://www.reddit.com/r/haskell/comments/1pkzd0/show_reddit_my_weekend_project_purescript/ http://www.reddit.com/r/haskell/comments/1pkzd0/show_reddit_... Basically, I wrote this partly just for fun, but also because each of the current options (Fay, Elm, Roy, TypeScript, etc.) all had some small feature I wanted to change. The biggest factor for me was the generation of compact, readable, debuggable Javascript.
- beefsack 13y agoA relevant comparison would be to TypeScript, which has already picked up a fair bit of steam: http://www.typescriptlang.org/ http://www.typescriptlang.org/
- paf31 13y agoYes, I write an app in TypeScript at work. I generally like it a lot, but part of the reason I created this was out of some frustration with its type system.
- nailer 13y agoYou could make the examples more understandable by using non-minified variable names. I'm not sure what 'itoa' ing something does, or what an 'o' is.
- chrismonsanto 13y agoitoa would be familiar to any C programmer (Integer TO Ascii)
- J_Darnley 13y agoI am familiar with atoi but I have never seen itoa, one of the printf family is usually used. However looking it up, a few websites list the function but clearly say that it isn't ANSI C.
- nailer 13y agoFair enough, but there's a lot of people who know JS, don't write JS like C and just want types.
- eru 13y agoFor me it looks like he's just using Haskell conventions. People in Haskell land use such short variable names for abstract variables. (I.e. when you don't really know much about their type.)
- eru 13y agoIn pattern matching, how do you discriminate between literal patterns and variables patterns? I'm especially curious about how `true' and `false' vs `result' are handled.
- paf31 13y agoThis is handled in the parser. There are two productions, identifier and reserved and the two don't intersect. Reserved identifiers like true and false match more eagerly than regular identifiers.
- strmpnk 13y agoWas anyone else a little disappointed to find that it was yet another Haskell inspired language (like Fay, Roy, Elm, Lambdascript, ghcjs, &c)? I was really hoping to find a version of Pure http://purelang.bitbucket.org http://purelang.bitbucket.org adapted for the browser. It seems like a custom language that compiles to JavaScript is the new standard Haskell pet project. For those wondering on what other JS powered languages there are, check out http://altjs.org http://altjs.org.
- elwell 13y agoThat first example is going to scare a lot of people away. What's with the indentation and that semi-colon at the beginning of the line?
- paf31 13y agoThat style of indentation is more common in Haskell libraries, and I'm not sure what you don't like about the whitespace.
- kennyledet 13y agoGreat work, and I will star it and follow progress, but I'd rather put more efforts into learning new ECMAScript 6 stuff. I will definitely look more into it after that though.