Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I personally recommend looking at OCaml, which has a JavaScript compiler called js_of_ocaml[1]. Using OCaml is a great way to give your projects structure without sacrificing expressiveness--I think it's a much better bet for large projects than something like Dart which reeks too much of Java. The JavaScript compiler is also very good. It compiles down from OCaml bytecode. I've also found the mechanisms for interacting with existing JavaScript libraries relatively easy to use and understand, although admittedly most of what I did with it did not do much DOM manipulation.

[1]: http://ocsigen.org/js_of_ocaml/

There are also some cool frameworks for using OCaml on the server (although I haven't used them myself). So with OCaml you can use the same language for the frontend and the backend, which is always nice.



OK, I'll bite. In what ways does Dart reek of Java?

* Dart has top-level variables and functions, Java does not. * Dart has optional static types, Java does not. * Dart programs start at main(), Java does not (see static initializers) * Dart has factory constructors, Java does not. * Dart has true lexical scope and nested functions, Java does not. * Dart doesn't need to be compiled into bytecode, Java does. * Dart's classes have implicit interfaces, Java does not. * Dart has auto generated getters and setters for fields, Java does not. * Dart has one-line function syntax, Java does not. * Everything in Dart is an object, Java has primitives. * Dart has only library privates, Java has public/protected/package/private. * Dart starts quicker than Java.

In all fairness, both Dart and Java and JavaScript use { } and ;


Also http://haxe.org/ which was originally inspired by OCaml (iirc) and complies to JavaScript, Flash, NekoVM, PHP, C++ and C#.

It's pretty cool.


I also wrote this response a while ago, which has additional details: http://news.ycombinator.com/item?id=4530903




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: