I don't really get what's special about OCaml with these points they raise? Wouldn't almost any strongly typed language do? Wouldn't TypeScript also tick all these boxes? EDIT: I wouldn't choose TypeScript either for this type of use case, but not for the reasons they state, that's my point
OCaml has a much stronger type system than Typescript. The real question is "why not Rust?". I've used both a fair bit and OCaml's only major advantage IMO is compile time. That doesn't seem compelling enough to put up with the downsides to me.
We chose OCaml to write Stategraph
31–40 of 127 posts
Re: We chose OCaml to write Stategraph
#32Earlier quoted context omitted.
OCaml has a much stronger type system than Typescript. The real question is "why not Rust?". I've used both a fair bit and OCaml's only major advantage IMO is compile time. That doesn't seem compelling enough to put up with the downsides to me.
I'm the CTO of Terrateam. For "why not rust", I have found the downsides of Rust not compelling enough to use it. We don't need close-to-metal performance. We don't really need the borrow checker, a GC is fine. We are immutable by default so the borrow checker doesn't help much there.
Re: We chose OCaml to write Stategraph
#33Re: We chose OCaml to write Stategraph
#34Earlier quoted context omitted.
The first comments here are people reading this as if the authors are saying only OCaml can do this. They aren't.
Exactly! OCaml is the language I like to solve problems in, and I'm excited to solve problems in, so that's why Terrateam uses OCaml (I'm the CTO). You can do a lot (but not all) of this in Go, or TypeScript, but I don't get excited about those languages. Certainly I'll use them if I have to (our UI is written in Svelte) but building your own company is a grind, and using OCaml makes the grind just a bit more excitin…
Re: We chose OCaml to write Stategraph
#35Earlier quoted context omitted.
I'm the CTO of Terrateam. For "why not rust", I have found the downsides of Rust not compelling enough to use it. We don't need close-to-metal performance. We don't really need the borrow checker, a GC is fine. We are immutable by default so the borrow checker doesn't help much there.
Great choice by way, I feel too many reach out for Rust, because they lack the perspective ML type systems are not something introduced by Rust, rather a long linage of languages since ML/Standard ML.
I know that isn't everyone's view, but I do hope posts like this, even if not technicaly deep, at least let people know that there are lots of options out there.
Re: We chose OCaml to write Stategraph
#36I don't really get what's special about OCaml with these points they raise? Wouldn't almost any strongly typed language do? Wouldn't TypeScript also tick all these boxes? EDIT: I wouldn't choose TypeScript either for this type of use case, but not for the reasons they state, that's my point
OCaml has a much stronger type system than Typescript. The real question is "why not Rust?". I've used both a fair bit and OCaml's only major advantage IMO is compile time. That doesn't seem compelling enough to put up with the downsides to me.
Re: We chose OCaml to write Stategraph
#37Re: We chose OCaml to write Stategraph
#38Re: We chose OCaml to write Stategraph
#39Re: We chose OCaml to write Stategraph
#40Earlier quoted context omitted.
OCaml has a much stronger type system than Typescript. The real question is "why not Rust?". I've used both a fair bit and OCaml's only major advantage IMO is compile time. That doesn't seem compelling enough to put up with the downsides to me.
I don’t like OCaml myself, but I’d pick it over rust here as bare metal perf is not necessary, and time wasting fighting the borrow checker is just not worth it.
Occasionally I do still fight it, e.g. if you want a self-borrowing structure there still isn't a great solution (I think Rust should support position independent borrows) but overall it's fine.