Hacker News new | past | comments | ask | show | jobs | submit login

In the same space there is Haxe http://haxe.org/ . It's also an Algol-like language that targets both JavaScript and Java (and flash, c++, .net, php).



Haxe has a few more language features (abstract types) and compiler features (dead code elimination) but it lacks a few from Ceylon such as union types.

The Haxe compiler is much, much faster than Ceylon. I wonder if certain features just can't pass a speed threshold.


haxe's enums seem like full-fledged union types: http://haxe.org/manual/types-enum-instance.html


There's also Ceylon's enumerated subtypes, which look similar: http://ceylon-lang.org/documentation/1.0/introduction/#enume...

However, Haxe's algebraic data types are really not the same thing. It takes a bit more code to achieve an identical effect. On the other hand, algebraic data types are much more general purpose, and allow techniques like pattern matching.

http://en.wikipedia.org/wiki/Algebraic_data_type http://haxe.org/manual/lf-pattern-matching-introduction.html

In the case of Haxe, you can construct a pattern that uses guards and/or extractors (e.g., a pattern that matches cases where you have an empty Tree, or a tree that contains a specific Node. You could also do matches on structural subtypes, etc.)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: