(→Roy: add PureScript)
(add GorrillaScript, more sections)
Revision as of 19:08, 3 November 2013
1 The problem
thisbehaviour, and lack of static types.
2 Mainstream alternatives
TypeScript defaults to dynamic typing when it can't figure the type out. However, it now has a noImplicitAny setting that will give a compilation error if it can't figure out the type.
3 Haskell -> JS
- Only works for UHC, but promising.
- UHC compiles enough of Hackage to be very useful.
- Doesn't produce an explosion of code, seemingly.
- Fairly substantial JS/DOM/W3C/HTML5 API.
- Currently works.
git clone git://github.com/faylang/fay.git
- Compiles a subset of Haskell, needs more
- Currently works.
The Github page is here.
- Nicely designed.
- Compiles most pure Haskell libraries no problem.
- FFI to JS works, and the author, sviperll is a helpful guy.
- Work in progress.
- Generates relatively small and fast code.
- Lightweight concurrency, Cabal integration, FFI and GHC extensions supported.
- Cross platform.
- Haskell interpreter in JS — An interpreter. Haven't tried but is apparently dead.
- hjscript — Beta. EDSL, not Haskell→JS. Works. Not very annoying to program in, but is JS semantics, not Haskell. Hackage package here.
- Some have also tried writing a Haskell→JS compiler to make a more direct JS-aware translation of code (to not have huge code output a la GHCJS, YHC, Emscripten).
3.6 FP -> JS
The OCaml -> JS compiler is supposed to be good, maybe someone can add links here.
immutable by default, global type inference, macros, what coffeescript should have been. The syntax is similar to coffeescript
On the Haskell wiki (see above) and on hackage
- Mature, Maintained
- Not Haskell
- Untyped, but with syntactic correctness (at least) enforced at compile-time.
- Embeddable through quasi-quoting
- Support for various forms of code-generation
4.3 Roy, PureScript
- Full dependent types with dependent pattern matching where clauses, with rule, simple case expressions, pattern matching let and lambda bindings
- Dependent records with projection and update
- Type classes
- Monad comprehensions
- Syntactic conveniences for lists, tuples, dependent pairs do notation and idiom brackets
- Indentation significant syntax
- Extensible syntax
- Tactic based theorem proving (influenced by Coq)
- Cumulative universes
- Totality checking
- Simple foreign function interface (to C)
- Hugs style interactive environment
- Website idris-lang.org
- Dependent Type in haskell wiki
- WP (en) Dependent type (with Idris listed under language comparison)
- Early binding allows for static verification of the existence of method-signature pairs (e.g. v-tables). Late binding does not give the compiler (or an IDE) enough information for existence verification, it has to be looked up at run-time.
- Google Inc. thought it necessary to develop a compiler, Google Closure, which does type-checking and limited inference.