Re:PureScript
by paf31 on Friday November 01, 2013 @02:38AM
(#6652172)
Yes, 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.
Re:PureScript
by MilesTeg on Friday November 01, 2013 @09:48AM
(#6653661)
TypeScript was obviously on your mind. The readme states 'Functions in TypeScript can have zero or more arguments in general, just like in Javascript.' You might want to change that to 'PureScript'
Re:PureScript
by GhotiFish on Friday November 01, 2013 @12:27AM
(#6651765)
This 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.
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.
Re:PureScript
by strmpnk on Friday November 01, 2013 @09:54AM
(#6653709)
Was 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 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.
Re:PureScript
by eru on Friday November 01, 2013 @08:27AM
(#6653197)
For 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.)
Re:PureScript
by J_Darnley on Friday November 01, 2013 @06:47AM
(#6652891)
I 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.
Re:PureScript
by eru on Friday November 01, 2013 @08:28AM
(#6653205)
In 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.
Re:PureScript
by paf31 on Friday November 01, 2013 @03:18PM
(#6655681)
This 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.
Re:PureScript
by kennyledet on Saturday November 02, 2013 @02:57PM
(#6660262)
Great 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.
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.