7 ms·
This is also somewhat backed up by the fact that OCaml (to my understanding) is basically GC Rust without a borrow checker, and yet it’s basically a hobby langu
by mr_00ff00 1y ago
This is also somewhat backed up by the fact that OCaml (to my understanding) is basically GC Rust without a borrow checker, and yet it’s basically a hobby language.
- dismalaf 1y agoHobby language? Plenty of commercial and important software has been written in OCaml. Hell, the early versions of the Rust compiler were written in OCaml...
- littlestymaar 1y agoRealistically unless you want to work at Jane Street or Inria (the French computer science lab where Ocaml was made), if you want to use Ocaml, it's going to be as a hobby.
- School-Cotton 1y agoThere is also Ahrefs.
- dismalaf 1y agoYou can say that for almost any language that's not C/C++, C#, Java, Python and JS. Rust is just barely beginning to become "corporate". Even Ruby, which is pretty mainstream, has relatively few jobs compared to the big corporate languages.
- littlestymaar 1y agoNon-hobby languages is a narrow club, yes. Your list is at least missing PHP, Typescript, Swift, Go, Lua, Ruby and Rust though. But Ocaml really doesn't belong anywhere close to this list.
- dismalaf 1y agoUmmm Lua? It's a nice little scripting language, but literally never seen a job ad for a job using mostly Lua. It's almost the definition of hobby language... OCaml runs software that billions use, is used by financial and defense firms, plus Facebook. But Lua? By that metric I'm throwing in every language I've ever seen a job for... R, Haskell, Odin, Lisp, etc... Edit - this site is basically a meme at this point. Roblox is industrial strength but Facebook, Dassault and trading firms are "hobby". Lol. Also, I'm not dissing Lua, there's just irony in calling Lua industrial but not OCaml...
- School-Cotton 1y agoLuaJIT is widely used for writing Nginx plugins.
- maleldil 1y agoLua is widely used for scripting in games. It might not be the main language of the project, but it's still very common.
- zoky 1y agoRoblox apps are built in Lua.
- epcoa 1y agoLua has petered out a bit but it has been used as a scripting and config language for a ton of games and commercial embedded. Not a hobby language, not typically a main implementation language but that doesn’t mean no commercial use. posix/bash shell isn’t a hobby language either, but unless you’re Tom Lord or something (RIP) you’re not doing the entire project in it. Do realize that luajit for years was bankrolled by corporations.
- zer00eyz 1y ago> But Lua? Lua, Bash ... these are birds of a feather. They are the glue holding things together all over the place. No one thinks about them but if they disappeared over night a LOT of stuff would fall apart.
- TuxSH 1y agoSpeaking of Ruby, its usage has cratered down in the past decade: https://madnight.github.io/githut/#/pull_requests/2024/1 https://madnight.github.io/githut/#/pull_requests/2024/1
- dismalaf 1y agoWell, it was hyped beyond belief at one point... Kind of nice that it's back to being niche, I'd hate for it to become Python or TS. I kind of like that Ruby is still focusing on single developer/small team productivity.
- vlovich123 1y agoHow may be the wrong word, but it’s definitely a niche language and significantly less software is written in it
- mr_00ff00 1y agoMaybe I’m wrong, but I only really know of Jane Street for OCaml, meanwhile FAANG all has at least some rust code. Also I would argue the rust compiler started as a hobby project
- airstrike 1y agoAlso Bloomberg: https://news.ycombinator.com/item?id=28278553 https://news.ycombinator.com/item?id=28278553
- dismalaf 1y agoFacebook Messenger's backend was/is OCaml... React was originally written in SML, then OCaml, then whatever it is now. And a bunch of places use it for various things. https://ocaml.org/industrial-users https://ocaml.org/industrial-users
- one-note 1y agoReact is and has always been javascript…
- shakna 1y agoNot what the author of React says: > Yes, the first prototype of React was written in SML; we then moved onto OCaml. > Jordan transcribed the prototype into JS for adoption; the SML version of React, however great it might be, would have died in obscurity. The Reason project's biggest goal is to show that OCaml is actually a viable, incremental and familiar-looking choice. We've been promoting this a lot but I guess one blog post and testimonial helps way more. https://news.ycombinator.com/item?id=15209814 https://news.ycombinator.com/item?id=15209814
- one-note 1y agoSure, a prototype of an idea that would eventually become React was rewritten into JS to create the initial seed of the software that would eventually be called React.
- nine_k 1y agoRather, an academia language. Also, OCaml had trouble with multithreading for quite some time, which was a limiting factor for many applications. Facebook made a large effort to thrust OCaml into the limelight, and even wrote a nice alternative frontend (Reason). Sadly, it did not stick.
- creata 1y agoI had the impression that SML was more popular in academia, and OCaml in industry. Old but funny comparison: http://adam.chlipala.net/mlcomp/ http://adam.chlipala.net/mlcomp/
- pyrale 1y agoSML was a generation before ocaml. I would say the two languages from the same generation that competed for academia's mindshare were ocaml and Haskell.
- creata 1y agoTimeline-wise, sure, but I was referring to their present-day use.
- coldtea 1y agoIf by "popular in industry" you mean a handful of companies use it, but has 1/100th the momentum and community and resources of Go or Rust, then yes.
- creata 1y agoI meant among ML-family languages. > 1/100th the momentum and community and resources of Go or Rust I think even 1/100 would be pretty generous.
- creata 1y agoI think there are two other big differences that also helped Rust become popular: * Rust has a C++-flavored syntax, but OCaml has a relatively alien ML-flavored syntax. * Rust has the backing of Mozilla, but I don't think OCaml had comparable industry backing. (Jane Street, maybe?)
- shakna 1y agoFacebook and their Reason?
- dgfitz 1y ago> rust has a C++-flavored syntax I do not at all agree with this. Rust is by far the most complex language in terms of syntax that has ever become popular enough to compare it to anything.
- packetlost 1y agoI 100% disagree with this. Typescript is syntactically far more complex.
- TylerE 1y agoComplex isn't the same thing as hard. The rust syntax often times looks like a cat walked across the keyboard.
- oneshtein 1y agoIn my eyes, Rust code is as simple as Python code or even simpler in most cases, but it also allows to create and maintain complex pieces of abstraction, when necessary, then hide them in a library or a macro. :-/ Can you show example of "written by random cat" code you often see?
- deleted 1y ago[deleted]
- packetlost 1y ago
- pyrale 1y ago> and yet it’s basically a hobby language. The difference between academia languages such as ocaml or haskell and industry languages such as Java or C# is hundreds of millions of dollar in advertising. It's not limited to the academy: plenty of languages from other horizons failed, that weren't backed by companies with a vested interest in you using their language. You should probably not infer too much from a language's success or failure.
- estebank 1y agoYou're making it sound like the success of a language is determined purely by its advertising budget by pointing at languages that had financial backing, which disregards that financial backing allows for more resources to solve technical problems. Java and C# have excellent developer tools which wouldn't have existed in their current state without lots of money being thrown around, and the languages' adoption trajectory wouldn't have looked the way they did if their tooling hasn't been as good as it was. A new language with 3 people behind it can come up with great ideas and excellent execution, but if you can't get enough of the scaffolding built in order to gain development momentum and adoption, then it is very hard to become mainstream, and money can help with that.
- pyrale 1y ago> which disregards that financial backing allows for more resources to solve technical problems. No, I'm not talking about financial backing in general, I'm talking specifically about advertising the language. There's no doubt that a big ecosystem helps a lot, Python is a good proof of that ; but this is not what i was talking about.
- coldtea 1y agoC, C++, Python, Perl, Ruby, didn't have "millions of dollars in advertising", and yet. Java and C# are the only one's that fit this. Go and Rust had some publicity from being associated with Google and Mozilla, but they both caught on without "millions of dollars in advertising" too. Endorsement by big companies like MS came much later for Rust, and Google only started devoting some PR to Go after several years of it already catching momentum.
- mavelikara 1y agoThe first version of Rust compiler, I think, was written in OCaml.
- comonoid 1y agoIt was a bootstrap implementation.
- amelius 1y agoIdiomatic programming in a functional language requires garbage collection. There is a reason languages like OCaml and Haskell have a garbage collector. Without it, programming in these languages would be completely different. If you look at it from that perspective, then Rust is the hobby language.
- zx8080 1y ago> Without it, programming in these languages would be completely different. How different?
- zozbot234 1y ago> Idiomatic programming in a functional language requires garbage collection. Rust has functional programming features and no garbage collection, because the borrow checker can tell when a closure will outlive the references in its captured environment. We used to think that would not be feasible other than perhaps in very special cases - hence the need for GC to keep that environment around - but Rust proved that wrong quite convincingly.
- amelius 1y ago"Having FP features" does not mean "allow an idiomatic FP programming style". If this were the case, we'd be seeing a revolution in functional programming now. It's not like the FP community is slow to adopt good ideas. In fact, many innovations that lead to the invention of the borrow checker came from the functional programming world (linear, affine types, effect systems).
- coldtea 1y agoI wouldn't read too much into its lacking the borrow checker. It's not about not having a C-like syntax (huge mainstream points lost), good momentum, and not having the early marketing clout that came from Rust being Mozilla's "hot new language".