News for hackers. Stuff that matters.
Re:The borrowchecker is what I like the least about Rust by mr_00ff00 on Saturday July 19, 2025 @04:18PM (#44618977)
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.
Re:The borrowchecker is what I like the least about Rust by nine_k on Saturday July 19, 2025 @04:30PM (#44619086)
Rather, 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.

Re:The borrowchecker is what I like the least about Rust by creata on Saturday July 19, 2025 @04:34PM (#44619131)
I had the impression that SML was more popular in academia, and OCaml in industry.

Old but funny comparison: http://adam.chlipala.net/mlcomp/

Re:The borrowchecker is what I like the least about Rust by coldtea on Saturday July 19, 2025 @07:33PM (#44620482)
If 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.
Re:The borrowchecker is what I like the least about Rust by creata on Saturday July 19, 2025 @07:35PM (#44620494)
I 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.

Re:The borrowchecker is what I like the least about Rust by pyrale on Saturday July 19, 2025 @05:47PM (#44619728)
SML 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.
Re:The borrowchecker is what I like the least about Rust by creata on Saturday July 19, 2025 @06:57PM (#44620233)
Timeline-wise, sure, but I was referring to their present-day use.
Re:The borrowchecker is what I like the least about Rust by amelius on Saturday July 19, 2025 @06:55PM (#44620224)
Idiomatic 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.

Re:The borrowchecker is what I like the least about Rust by zx8080 on Saturday July 19, 2025 @08:47PM (#44620894)
> Without it, programming in these languages would be completely different.

How different?

Re:The borrowchecker is what I like the least about Rust by ksenzee on Saturday July 19, 2025 @10:23PM (#44621402)
I believe you meant "Different how?"
Re:The borrowchecker is what I like the least about Rust by dgfitz on Saturday July 19, 2025 @09:02PM (#44620961)
They addressed that: completely.
Re:The borrowchecker is what I like the least about Rust by zozbot234 on Sunday July 20, 2025 @01:38AM (#44622276)
> 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.

Re:The borrowchecker is what I like the least about Rust by amelius on Sunday July 20, 2025 @05:59AM (#44623520)
"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).
Re:The borrowchecker is what I like the least about Rust by zozbot234 on Sunday July 20, 2025 @06:33AM (#44623740)
What's an "idiomatic FP programming style"? Is typical LISP code "FP" enough? That uses GC of course, but other than that it's often high-level enough to be quite comparable w/ modern Rust.
Re:The borrowchecker is what I like the least about Rust by dontlaugh on Sunday July 20, 2025 @04:49AM (#44623146)
Not necessarily GC, but any kind of automated memory management that allows composition.
Re:The borrowchecker is what I like the least about Rust by coldtea on Saturday July 19, 2025 @07:32PM (#44620476)
I 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".

Re:The borrowchecker is what I like the least about Rust by creata on Saturday July 19, 2025 @04:41PM (#44619184)
I 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?)

Re:The borrowchecker is what I like the least about Rust by shakna on Saturday July 19, 2025 @08:46PM (#44620885)
Facebook and their Reason?
Re:The borrowchecker is what I like the least about Rust by dgfitz on Saturday July 19, 2025 @09:05PM (#44620974)
> 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.

Re:The borrowchecker is what I like the least about Rust by johnnyanmac on Saturday July 19, 2025 @11:33PM (#44621754)
C++ is a stretch, but I sort of understand GP's point. I'm slowly learning Rust now and it feels like a deep evolution of C type syntax. Not dissimilar to Javascript in the most base sense of language constructs.

But you use it more and see actionscript types of function notation, funtional language semantics where you just "return" whatever was the last expression in a statement, how structs have no bodies (and classes aren't a thing) and instead everything is implemented externally, and it starts to really become its own beast.

Re:The borrowchecker is what I like the least about Rust by creata on Sunday July 20, 2025 @01:12AM (#44622168)
I didn't think it was that controversial a statement. For example, Wikipedia says:[0]

> Rust's syntax is similar to that of C and C++,[43][44] although many of its features were influenced by functional programming languages such as OCaml.[45] Hoare has described Rust as targeted at frustrated C++ developers...[15]

I'm not sure what "actionscript types of function notation" means, but Rust's closures syntax (|x| ...) was probably inspired by Ruby and/or Smalltalk. Anyway, sure, the expression-orientedness, implicit return, etc., are very un-C++-like, but I do think the syntax was explicitly designed to be approachable to C++ developers.

[0]: https://en.wikipedia.org/w/index.php?title=Rust_(programming...

Re:The borrowchecker is what I like the least about Rust by packetlost on Saturday July 19, 2025 @10:11PM (#44621323)
I 100% disagree with this. Typescript is syntactically far more complex.
Re:The borrowchecker is what I like the least about Rust by TylerE on Sunday July 20, 2025 @12:13AM (#44621908)
Complex isn't the same thing as hard. The rust syntax often times looks like a cat walked across the keyboard.
Re:The borrowchecker is what I like the least about Rust by oneshtein on Sunday July 20, 2025 @01:13AM (#44622179)
In 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?

Re:The borrowchecker is what I like the least about Rust by packetlost on Sunday July 20, 2025 @04:52PM (#44629224)
And typescript's doesn't? They're incredibly similar syntactically except Typescripts type system is turing complete and unsound.
Re:The borrowchecker is what I like the least about Rust by binary132 on Sunday July 20, 2025 @07:50AM (#44624279)
I think some of that is just that C++ doesn’t explicitly express its semantic complexity in its syntax, while Rust does. In some ways this is an advantage for Rust, although yeah I agree it makes Rust really hard to use, and I kinda hate its syntax.
Re:The borrowchecker is what I like the least about Rust by mavelikara on Saturday July 19, 2025 @06:48PM (#44620165)
The first version of Rust compiler, I think, was written in OCaml.
Re:The borrowchecker is what I like the least about Rust by comonoid on Saturday July 19, 2025 @09:44PM (#44621172)
It was a bootstrap implementation.
Re:The borrowchecker is what I like the least about Rust by pyrale on Saturday July 19, 2025 @05:43PM (#44619707)
> 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.

Re:The borrowchecker is what I like the least about Rust by fooker on Saturday July 19, 2025 @08:14PM (#44620709)
> hundreds of millions of dollar

Yes.

> in advertising

No, in hiring 500 compiler and tool developers, developing and supporting libraries, optimizing it for niche use cases.

Re:The borrowchecker is what I like the least about Rust by pyrale on Sunday July 20, 2025 @03:42PM (#44628626)
The Java ecosystem has benefited from way more than that. I was specifically refering to advertising. For instance this kind of headlines [1].

[1]: https://www.theregister.com/2003/06/09/sun_preps_500m_java_b...

Re:The borrowchecker is what I like the least about Rust by fooker on Monday July 21, 2025 @02:31PM (#44638699)
This never played out, Sun ran out of money.
Re:The borrowchecker is what I like the least about Rust by estebank on Saturday July 19, 2025 @06:46PM (#44620133)
You'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.
Re:The borrowchecker is what I like the least about Rust by pyrale on Sunday July 20, 2025 @03:45PM (#44628651)
> 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.

Re:The borrowchecker is what I like the least about Rust by coldtea on Saturday July 19, 2025 @07:36PM (#44620503)
C, 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.

Re:The borrowchecker is what I like the least about Rust by Narishma on Saturday July 19, 2025 @11:22PM (#44621705)
I don't know about the others but C and C++ certainly did. They had a large number of commercial compiler vendors advertising them in the 80s and 90s when they established themselves.
Re:The borrowchecker is what I like the least about Rust by crote on Saturday July 19, 2025 @09:13PM (#44621013)
The main difference is the ecosystem. The Haskell community has always focused primarily on the computer science part, so the developer experience has mostly been neglected. They have been unable to attract a large enough hobbyist community to develop the libraries and tooling you'd take for granted with any other language, and no company is willing to pay for it out of pocket either. Even load-bearing libraries feel like a half-finished master's thesis, because that's usually what it is.

No amount of advertising is going to propel Haskell to a mainstream language. If it wants to succeed (and let's be honest, it probably doesn't), it's going to need an investment of millions of developer-hours in libraries and tooling. No matter how pretty and elegant the language may be, if you have to reinvent the wheel every time you go beyond "hello world" you're going to think twice before considering it for production code.

Re:The borrowchecker is what I like the least about Rust by biorach on Sunday July 20, 2025 @04:54AM (#44623177)
> 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

Rust is a significant counterexample

Re:The borrowchecker is what I like the least about Rust by dismalaf on Saturday July 19, 2025 @04:22PM (#44619005)
Hobby language? Plenty of commercial and important software has been written in OCaml.

Hell, the early versions of the Rust compiler were written in OCaml...

Re:The borrowchecker is what I like the least about Rust by vlovich123 on Saturday July 19, 2025 @04:28PM (#44619065)
How may be the wrong word, but it’s definitely a niche language and significantly less software is written in it
Re:The borrowchecker is what I like the least about Rust by mr_00ff00 on Saturday July 19, 2025 @04:30PM (#44619082)
Maybe 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

Re:The borrowchecker is what I like the least about Rust by airstrike on Saturday July 19, 2025 @04:36PM (#44619150)
Re:The borrowchecker is what I like the least about Rust by dismalaf on Saturday July 19, 2025 @04:55PM (#44619315)
Facebook 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

Re:The borrowchecker is what I like the least about Rust by bastawhiz on Saturday July 19, 2025 @08:17PM (#44620727)
React was never written in SML or Ocaml. It was originally called FaxJS, and the source code is published online.

A version of React was built to run in ReasonML, which is a flavor of Ocaml for the web, but Reason didn't even exist before React was fairly well established.

Re:The borrowchecker is what I like the least about Rust by dismalaf on Saturday July 19, 2025 @08:30PM (#44620796)
Re:The borrowchecker is what I like the least about Rust by bastawhiz on Saturday July 19, 2025 @09:29PM (#44621092)
That's a nonsensical point, though. Building a proof of concept in a language and then rebuilding the practical implementation of it in another language and runtime doesn't make the two the same thing. If Notch had built a proof of concept of Minecraft in Python before building the Java version, we wouldn't say Minecraft was originally written in Python. There wasn't even a robust way to compile OCaml for the web in 2010/2011 even if you wanted to try to use the same code. My understanding is that zero SML or Ocaml related to React ever ran in production, which makes the assertion that it was used in anything other than an academic capacity moot.

Hell, Facebook's own XHP's interface (plus PHP/Hack's execution model) is more conceptually relatable to React, and its initial development predates Jordan's time at Facebook. It wasn't JavaScript, but at the very least it defined rails for writing applications that used the DOM.

Re:The borrowchecker is what I like the least about Rust by one-note on Saturday July 19, 2025 @07:37PM (#44620508)
React is and has always been javascript…
Re:The borrowchecker is what I like the least about Rust by shakna on Saturday July 19, 2025 @08:48PM (#44620902)
Not 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

Re:The borrowchecker is what I like the least about Rust by one-note on Sunday July 20, 2025 @02:45AM (#44622554)
Sure, 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.
Re:The borrowchecker is what I like the least about Rust by littlestymaar on Saturday July 19, 2025 @04:26PM (#44619055)
Realistically 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.
Re:The borrowchecker is what I like the least about Rust by umanwizard on Saturday July 19, 2025 @04:46PM (#44619224)
There is also Ahrefs.
Re:The borrowchecker is what I like the least about Rust by dismalaf on Saturday July 19, 2025 @05:06PM (#44619408)
You 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.
Re:The borrowchecker is what I like the least about Rust by TuxSH on Saturday July 19, 2025 @06:58PM (#44620243)
Speaking of Ruby, its usage has cratered down in the past decade: https://madnight.github.io/githut/#/pull_requests/2024/1
Re:The borrowchecker is what I like the least about Rust by dismalaf on Saturday July 19, 2025 @07:10PM (#44620344)
Well, 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.

Re:The borrowchecker is what I like the least about Rust by littlestymaar on Saturday July 19, 2025 @06:29PM (#44620030)
Non-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.

Re:The borrowchecker is what I like the least about Rust by dismalaf on Saturday July 19, 2025 @06:59PM (#44620253)
Ummm 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...

Re:The borrowchecker is what I like the least about Rust by epcoa on Saturday July 19, 2025 @07:24PM (#44620436)
Lua 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.

Re:The borrowchecker is what I like the least about Rust by maleldil on Saturday July 19, 2025 @07:07PM (#44620308)
Lua is widely used for scripting in games. It might not be the main language of the project, but it's still very common.
Re:The borrowchecker is what I like the least about Rust by zoky on Saturday July 19, 2025 @07:18PM (#44620390)
Roblox apps are built in Lua.
Re:The borrowchecker is what I like the least about Rust by zer00eyz on Saturday July 19, 2025 @07:34PM (#44620487)
> 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.

Re:The borrowchecker is what I like the least about Rust by littlestymaar on Sunday July 20, 2025 @12:30AM (#44621992)
As others already pointed out, Lua is used in tons of video games as the scripting language.

The most famous example being World of Warcraft, but it's far from the only one. If you play, or have played, games, you almost certainly have run software built with Lua without realizing it.

It's not because a language isn't relevant in your personal coding niche that it's not industrially relevant.

Re:The borrowchecker is what I like the least about Rust by dismalaf on Sunday July 20, 2025 @10:52AM (#44625724)
I'm simply pointing out the irony in calling a (mostly game) scripting language like Lua "industrial" while calling a language used by FAANG, defense companies and finance companies a "hobby" language.
Re:The borrowchecker is what I like the least about Rust by littlestymaar on Sunday July 20, 2025 @01:06PM (#44627104)
There's no irony, bash and VB6, no matter what you think about the quality of the said languages, are also scripting language and neither are in the “hobby language” category as their use is (or was) very broadly distributed.

OCaml's use is comparatively very, very narrow.

And, in case you are wondering, I have absolutely nothing again OCaml. In fact, my first ever programming language was, as a significant fraction of French engineer from my generation, the “Lite” dialect of Caml. And I suspect that its OCaml heritage is a significant fraction of the reason why I love Rust.

But being used by exactly one FANG company, a single finance one and allegedly a defense company (aren't you confusing Dassault System with Dassault Aviation ?) isn't enough to change its status, especially when it's not the dominant language in two of those (AFAIK Jane Street really is the only one where OCaml has such a central place).

Re:The borrowchecker is what I like the least about Rust by dismalaf on Sunday July 20, 2025 @06:49PM (#44630117)
Dassault Systèmes makes defense software, among other things... https://www.3ds.com/industries/aerospace-defense

Dassault Aviation makes the planes themselves. All Dassault companies are under one umbrella anyway.

The OCaml website lists a bunch of other users.

In my opinion, none of that really matters, any single one of those uses proves it's utility... Facebook Messenger alone is probably used by more people than every piece of Lua software ever made though.

Re:The borrowchecker is what I like the least about Rust by littlestymaar on Wednesday July 23, 2025 @11:25AM (#44660284)
There's a funny small list of true claims in your message above…

First, Dassault Systèmes doesn't fall "under one umbrella" with Dassault aviation, it is an independent public company (with the Dassault group having minority shares in the company). And just because a software company has defense related products doesn't make it a “defense company”, nobody would ever call either IBM or Microsoft “Defense Companies”.

Then Facebook doesn't seem to be using Ocaml in Facebook Messenger, and instead uses its standard tech stack for that (the Hack PHP derivative).

The fact that Facebook has a developer-facing team building internal development tools with OCaml doesn't suffice to change the status of a language: since there are barely any Ocaml developers at Facebook, an Ocaml enthusiast would have to be very, very lucky to land an Ocaml job there…

And that's the whole point of the “hobby language” status: can you land a job using it or not, and Ocaml simply isn't that kind of language. And again, France has been teaching Ocaml to at least a hundred thousands of students over the years.

Re:The borrowchecker is what I like the least about Rust by umanwizard on Sunday July 20, 2025 @10:32AM (#44625578)
LuaJIT is widely used for writing Nginx plugins.