Re:Reflections on my first completed application in OCaml
by davidbrennerjr on Monday November 16, 2020 @01:19AM
(#25108681)
are there any advantages to using OCaml for making web apps?
[ Parent
| on HN ]
Re:Reflections on my first completed application in OCaml
by fbsvvc123 on Monday November 16, 2020 @02:13AM
(#25108992)
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.
Re:Reflections on my first completed application in OCaml
by kdkeyser on Monday November 16, 2020 @08:17AM
(#25111243)
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.
Re:Reflections on my first completed application in OCaml
by yawaramin on Monday November 16, 2020 @01:17PM
(#25115059)
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.
Re:Reflections on my first completed application in OCaml
by johnnycerberus on Monday November 16, 2020 @06:24AM
(#25110459)
If you are interested in web apps, you should pick a platform first:
* Node with TypeScript
* JVM with Scala
* CLR with F#