4 ms·
Is ocaml a system language?
by golergka 3y ago
Is ocaml a system language?
- avbanks 3y agoYes believe it or not ocaml is a systems language.
- systems 3y agoyes it can be used to create systems and backend tools - it is used to create an OS https://github.com/mirage - it is used to create a transpiler https://melange.re/v2.2.0/ - it was used to create Rust first compiler ocaml is surely a systems language
- Rendello 3y agoThe predominant OCaml shop is Jane Street, they have a good podcast where they talk to those involved in their infrastructure. A lot of the episodes go into the tradeoffs between the GC'd and functional OCaml vs languages like C++ and Rust: https://signalsandthreads.com/ https://signalsandthreads.com/
- Buttons840 3y agoThere's nothing "system" about a compiler. What language hasn't been used to create a compiler or two? If languages used to create compilers are system languages, then all languages are system languages. Writing a OS is more "system", and certainly those using the Mirage operating system use OCaml as a system language.
- actionfromafar 3y agoSo sad IncludeOS https://github.com/includeos/IncludeOS https://github.com/includeos/IncludeOS is no longer developed.
- akprasad 3y agoIt depends on what you mean by "system language." For me, this category mainly includes languages that provide fine-grained control over memory management (C, C++, Zig, Rust, ...), so I personally wouldn't include OCaml.
- thefaux 3y agoThis question reminds me of is golf a sport or a game? A colloquial definition of systems language seems close to: "exposes low level details and doesn't have garbage collection." By this definition c, c++, zig and rust are system languages, java and ocaml are not. Go is debatable (and people do debate this). Personally though, I prefer to think of what types of _systems_ I can build with a language. I can design a framework in a high level language which then transpiles to, say, c. I consider this high level language to be a systems language because it facilitates a system (the framework). Others will disagree but it comes down essentially to a semantic question over what counts as a system language. That debate doesn't seem especially fruitful to me.
- lmm 3y agoIf Go is a "system language" then OCaml certainly is. It's suitable for writing system tools in, and people do. TBH the whole concept is pretty meaningless though.
- kazinator 3y agoShell is a systems language; people boot systems with it, including embedded.