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

are there any advantages to using OCaml for making web apps?



No. You can get similar language-level benefits from languages with stronger ecosystems around web-relevant technologies. For example, F# is very close to Ocaml, but has a healthier ecosystem for web stuff.


ReScript (formerly called ReasonML), is an interesting option for web apps (especially the front-end part), if you are interested in Ocaml-like languages.

Language-wise, it is Ocaml with a different syntax layer, so all of the nice things about the language are still available.


Yes, especially in the ReScript toolchain ( rescript-lang.org/ ), there are many benefits:

- Super-fast compiler

- Readable and succinct JS output with nearly 1-to-1 mapping from OCaml source

- Simple module system with no need to explicitly import modules--the compiler takes care of it for you

- High-quality React and other bindings

- The standard advantages of the type system like expressive power of data types and pattern matching with exhaustivity checking

- Tons of super useful built-in lints like 'unused variable', 'unused function parameter', 'discarding a value', etc.


If you are interested in web apps, you should pick a platform first:

* Node with TypeScript

* JVM with Scala

* CLR with F#




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

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

Search: