News for hackers. Stuff that matters.
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.