Remix.run Logo
noelwelsh 5 days ago

I saw a talk by someone from Google about their experiences using Rust in the Android team. Two points stuck out: they migrated many projects from Python, so performance can't have been that much of a concern, and in their surveys the features people liked most were basics like pattern matching and ADTs. My conclusion is that for a lot of tasks the benefit from Rust came from ML cicra 1990, not lifetimes etc. I feel if OCaml had got its act together around about 2010 with multicore and a few other annoyances[1] it could have been Rust. Unfortunately it fell into the gap between what academia could justify working on and what industry was willing to do.

[1]: Practically speaking, the 31-bit Ints are annoying if you're trying to do any bit bashing, but aesthetically the double semicolons are an abomination and irk me far more.

nine_k 5 days ago | parent | next [-]

I'd say that Google strives to have a reasonably short list of languages approved for production-touching code. Rust can replace / complement C++, while OCaml cannot (it could replace Go instead... fat chance!). So I suspect that the team picked Rust because it was the only blessed language with ADTs, not because they won't like something with faster compile times.

No way OCaml could have stolen the Rust's thunder: we have a number of very decent and performant GC-based languages, from Go to Haskell; we only had one bare-metal-worthy expressive language in 2010, C++, and it was pretty terrible (still is, but before C++11 and C++17 it was even more terrible).

GhosT078 4 days ago | parent | next [-]

In 2010, Ada 2005 was the most bare-metal-worthy expressive language. Now that would be Ada 2022.

nine_k 4 days ago | parent [-]

While at it: what was / is holding Ada back? I haven't seen a single open-source project built in Ada, nor did I hear about any closed-source corporate project that uses Ada's superpowers. (Most likely these exist! But I did not see any available, or at least well-publicized.)

People agree to go to great lengths to use a tool that has some kind of superpower, despite syntactic weirdness or tooling deficiencies. People study and use LISP descendants like Clojure, APL descendants like K, "academic" languages like Haskell and OCaml, they write hobby projects in niche languages like Nim or Odin, they even use even C++ templates.

Why is Ada so under-represented? It must have a very mature ecosystem. I suspect that it's just closed-source mostly, and the parties involved don't see much value in opening up. If so, Ada is never going to make it big, and will slowly retreat under the pressure of better-known open alternatives, even in entrenched areas like aerospace.

pjmlp 4 days ago | parent | next [-]

There are enough closed source corporate projects to keep 7 vendors in business, selling compilers, in an age developers hardly pay for their tools.

https://www.adacore.com/

https://www.ghs.com/products/ada_optimizing_compilers.html

https://www.ptc.com/en/products/developer-tools/apexada

https://www.ddci.com/products_score/

http://www.irvine.com/tech.html

http://www.ocsystems.com/w/index.php/OCS:PowerAda

http://www.rrsoftware.com/html/prodinf/janus95/j-ada95.htm

Ada was too hardware demanding for the kind of computers people could afford at home, we could already do our Ada-like programming with Modula-2 and Object Pascal dialect hence how Ada lost home computing, and FreePascal/Delphi would be much more used today, had it not been for Borland getting too gready.

On big iron systems, espcially among UNIX vendors they always wanted extra bucks for Ada.

When Sun started the trend of UNIX vendors to charge for the developer tools as an additional SKU, Ada wasn't part of the package, rather an additional license on top, so when you already pay for C and C++ compilers, why would someone pay a few thousand (select currency) more if not required to do so, only because of feeling good writing safer software, back in the days no one cared about development cost of fixing security bugs.

GhosT078 4 days ago | parent | prev | next [-]

Ada has been held back primary by an image problem that traces back to the high cost and poor performance of a lot of early Ada 83 compilers. Ada adoption has never really recovered from that despite its many technical advantages, and despite the low cost and good performance of several current compilers.

The GNAT Ada compiler, always open source and quite good, has been freely available since the 1990's. It has been part of GCC since about 2003.

There are plenty of open source Ada projects on GitHub and other places although not nearly as many as some other languages.

The Ada ecosystem is mature and complete, particularly the GNAT related tools supported by directly or indirectly AdaCore (https://github.com/AdaCore and https://alire.ada.dev/).

The language evolution has been stable and is still on-going. I have worked primarily with Ada for 30 years. I still work on new Ada projects on a mid-sized team. Most of us just don't participate in forums like this.

specialist 3 days ago | parent | next [-]

> early Ada 83 compilers

IIRC, in response, DARPA (et al) did invest in compiler research.

> adoption has never really recovered

Ya. Timing. There's a brief window of opportunity for new languages (ideas) to catch on before the horde of "worse is better" solutions overwhelm the field.

pavon 4 days ago | parent | prev [-]

For people who were actually interested in using Ada, the early poor tooling was the main impediment. However, I think the bigger issue is that it was moving directly against the cultural headwinds at the time.

The immediate response I heard anytime Ada was mentioned was that it was a designed-by-committee language[1] that couldn't even be fully implemented due to a theoretically impossible specification[2]. It was made by a bunch of bureaucratic stiffs and was all about constraining the developer with stupid rules and bogging them down with verbosity. It was contrary to the freewheeling nature of the PC developer culture that sprung up in the 70's and continued through the 80's, and then evolved into the dot-com developers of the 90's and 00's.

It took decades of wandering through the deserts of "Real Developers don't write buffer overflows" on one end, and "Performance doesn't matter, and a sufficiently smart compiler will provide it anyway" on the other to get to the point where mainstream developers wanted a language that combined the safety of high-level languages with the control of low-level languages.

[1] This is false, it was selected in a contest with each entry developed independently.

[2] True but overrated

michaelcampbell 4 days ago | parent | prev | next [-]

> While at it: what was / is holding Ada back?

I have a pet theory that it shares the same thing as any heavily typed language; it's difficult. And people aren't willing to accept that when you get it to compile at all, it'll probably work fine.

So many developers (and many more middle management) are not willing to trade the longer term stability/lack of runtime errors for the quick-to-production ability of other languages.

rz2k 4 days ago | parent | prev | next [-]

Take a look here: https://news.ycombinator.com/item?id=7824570

sitzkrieg 4 days ago | parent | prev [-]

excellent summary of the commercial side, and i personally think the open source tooling with alire got a LOT better. it's definitely worth checking out

hardwaregeek 5 days ago | parent | prev | next [-]

Wouldn’t Kotlin be a more reasonable choice in that case? It has ADTs and a lot of the same niceties of Rust.

Artamus 5 days ago | parent | next [-]

I'm inclined to think that the Python -> Rust was only for some odds and ends. I know the biggest recipient of Rust trainings was the Android platform team at first, which I think also used a lot of C++.

Kotlin is definitely available at Google, but when talking about sym types et al it's not nearly as nice to use as Rust / OCaml.

sureglymop 4 days ago | parent | prev | next [-]

Yes. It can also be compiled to native. I just think it was held back too much by the java/jvm backwards compatibility but then again that's probably also the justification for its existence.

I definitely find it (and jetpack compose) make developing android apps a much better experience than it used to be.

What I like a lot about Kotlin are its well written documentation and the trailing lambdas feature. That is definitely directly OCaml inspired (though I also recently saw it in a newer language, the "use" feature in Gleam). But in Kotlin it looks nicer imo. Allows declarative code to look pretty much like json which makes it more beginner friendly than the use syntax.

But Kotlin doesn't really significantly stand out among Java, C#, Swift, Go, etc. And so it is kind of doomed to be a somewhat domain specific language imo.

DerArzt 4 days ago | parent | next [-]

I wouldn't say it's doomed. For projects in large organizations that have a large amount of java already, it provides better ergonomics while allowing interop with the existing company ecosystem.

4 days ago | parent | prev | next [-]
[deleted]
pjmlp 4 days ago | parent | prev | next [-]

Java is castrated on purpose on Android as means to sell Kotlin.

If that wasn't the case, Google would support Java latest with all features, alongside Kotlin, and let the best win.

See how much market update Kotlin has outside Android, when it isn't being pushed and needs to compete against Java vLatest on equal terms.

StopDisinfo910 4 days ago | parent [-]

Blame Oracle. If they had been more forward looking and a bit less greedy, Java vLatest would be the default language on Android.

pjmlp 4 days ago | parent [-]

Not at all, I stand by Oracle on their lawsuit.

Android is Google's J++, which Sun sued and won.

Kotlin is Google's C#.

Plus everyone keeps forgetting Kotlin is a JVM based language, Android Studio and Gradle are implemented in JVM languages, JVM are implemented in a mix of C, C++ and Java (zero Kotlin), Android still uses Java, only that Google only takes out of OpenJDK what they feel like, and currentl that is Java 17 LTS, most of the work on OpenJDK was done by Oracle employees.

StopDisinfo910 4 days ago | parent [-]

> Not at all, I stand by Oracle on their lawsuit.

I think it will be very hard for us to find anything in common to agree on then.

Anyway, it’s pretty clear Google is pushing Kotlin because they don’t want to have anything to do with Oracle which has not been cleared by the verdict of their last trial. The situation has nothing to do with anything technical.

Blaming them for pushing Kotlin when the alternative you offer is them using a language they have already been sued for their use of seems extremely misguided to me.

pjmlp 4 days ago | parent [-]

We don't have to agree in anything, I wasn't asking for any agreement to start with.

I call them dishonest by comparing outdated Java 7 subset with Kotlin, when back in 2017 the latest version was Java 9, and in 2025 it is Java 24, and yet the documentation keeps using Java 8 for most examples on Java versus Kotlin.

How come Google doesn't want to have anything with Oracle, when it is impossible to build an Android distribution without a JVM, again people like yourself keep forgeting OpenJDK is mostly a product from Oracle employees (about 80%) with remaing efforts distributed across Red-Hat(IBM), IBM, Azul, Microsoft and JetBrains (I wonder what those do on Android), Kotlin doesn't build for Android without a JVM implementation, Gradle requires a JVM implementation, Android Studio requires a JVM implementation, Maven Central has JVM libraries,....

If Google doesn't want anything to do with Oracle why aren't they using Dart, created by themselves, instead of a language that is fully dependent on Oracle's kigdom for its own very existence?

StopDisinfo910 4 days ago | parent [-]

> How come Google doesn't want to have anything with Oracle

They clearly don’t want to add anything which couldn’t be reasonably covered by the result of the previous trial.

The list you give was all already there then. Moving to a more recent version of Java wouldn’t be.

> OpenJDK is mostly a product from Oracle employees (about 80%)

Sun employees, not Oracle employees. Using Sun technology was fine, using Oracle technology is something else entirely.

pjmlp 4 days ago | parent [-]

I advise you to educate yourself who works and owns OpenJDK copyrights.

Can start here, https://dev.java/contribute/openjdk/

"Once you have contributed several changes (usually two) you can become an Author. An author has the right to create patches but cannot push them. To push a patch, you need a Sponsor. Gaining a sponsorship is usually achieved through the discussions you had on the mailing lists.

In order to become an Author, you also need to sign the Oracle Contribution Agreement (OCA)."

The go into https://openjdk.org/bylaws

"The OpenJDK Lead is an OpenJDK Member, appointed by Oracle, who directs the major efforts of the Community, which are new implementations of the Java SE Platform known as JDK Release Projects."

And this nice contribution overview from Java 22,

https://blogs.oracle.com/java/post/the-arrival-of-java-22

"Of the 26,447 JIRA issues marked as fixed in Java 11 through Java 22 at the time of their GA, 18,842 were completed by Oracle employees while 7,605 were contributed by individual developers and developers working for other organizations. Going through the issues and collating the organization data from assignees results in the following chart of organizations sponsoring the development of contributions in Java:"

To spare you the math, 77% were done by Oracle employees.

Now please show us how Kotlin compiles for Android without using Java.

Doesn't look like Google got rid of Oracle to me, more like they didn't even considered Dart, nor Go could stand a chance against the Java ecosystem among Android developers.

StopDisinfo910 4 days ago | parent [-]

You wrote than 80% of OpenJDK was written by Oracle employees. That’s patently untrue. Most of OpenJDK was written by Sun employees before Oracle bought Sun.

Your link doesn’t change any of that nor your clearly condescending comment before. You are perfectly aware of the fact by the way and you know exactly what I meant so I don’t really understand the game you are playing.

Oracle can claim Sun contribution as their own as much as they want. It doesn’t change the fact that you would have to be insane to touch anything they do now that it’s Oracle property.

pjmlp 4 days ago | parent [-]

What is pathetic is the quality of your answers, who do you think has written the code between Java 6 and Java 24?

I wonder what magic pixie dust has been writing Java code since 2013, those Sun employees have been working really hard on their ghost offices, surrounded by Oracle daemons, down in the dungeons.

I am playing the FACTS game.

StopDisinfo910 4 days ago | parent [-]

There is no facts game. I am in full agreement with you that Oracle maintains Java nowadays and writes most of the modern code in it. It remains originally a Sun product, a Sun initiative and most of the JVM historical code has been written by Sun. I have little interest in going to actually look in how many lines are from then and how many are new. It wouldn’t substantially change the nature of my argument anyway.

You are free to pretend that Oracle is a great steward of the Java ecosystem if you want or that they had a point in the trial they so brilliantly lost.

I’m free to say I vehemently disagree and perfectly understand why Google would rather stay far away.

I would rather prefer you didn’t insult me however but you do you.

vips7L 4 days ago | parent [-]

Oracle has been a fantastic steward of Java. I don’t think Java would exist or still be popular without them. Java is in its best state it’s been in decades.

brabel 4 days ago | parent | prev [-]

> ... the trailing lambdas feature. That is definitely directly OCaml inspired...

Kotlin has a very similar syntax to Groovy, which already had that feature (it looks identical in Groovy and Kotlin)... and I believe Groovy itself took that from Ruby, I believe (Groovy tried to add most convenient features from Python and Ruby). Perhaps that is what came from OCaml?? No idea, but I'd say the chance Kotlin copied Groovy is much higher as JB was using Java and Groovy before Kotlin existed.

actionfromafar 5 days ago | parent | prev | next [-]

Garbage collector in Kotlin makes it a no go for C or C++ displacement.

pjmlp 4 days ago | parent [-]

As someone that has left pure C++ applications in 2006, and has mostly written mixed language projects since 1999, usually the displacement is more religious than anything else.

In many use cases even if the performance is within the project delivery deadlines there will worthless discussions about performance benchmarks completly irrelevant to the task at hand.

And ironically many of the same folks are using Electron based apps for their workflows.

rendaw 4 days ago | parent | prev | next [-]

I think GP means "algebraic data types" not "abstract data types", probably specifically tagged unions. Both Kotlin and Java can (now) do something similar with sealed classes but it's quite less ergonomic.

michaelcampbell 4 days ago | parent | prev | next [-]

Kotlin never had the "shiny new" aspect to it that Rust did; everyone gave it a bit of side-eye for coming from a company that wrote the IDE to support it well.

swiftcoder 4 days ago | parent | prev [-]

Potentially, but Kotlin is even more recent that Rust, and didn't get blessed internally at Google till somewhat later

4 days ago | parent | prev [-]
[deleted]
StopDisinfo910 4 days ago | parent | prev | next [-]

> I feel if OCaml had got its act together around about 2010 with multicore and a few other annoyances[1]

OCaml had its act together. It was significantly nicer than Python when I used it professionally in 2010. Just look at what JaneStreet achieved with it.

The main impediment to OCaml was always that it was not American nor mainly developed from the US.

People like to believe there is some technical merit to language popularity but the reality it’s all fashion based. Rust is popular because they did a ton of outreach. They used to pay someone full time to mostly toot their horn.

jvican 4 days ago | parent | next [-]

Hear, hear. This theory also explains why other languages such as Scala were never really mainstream despite allowing Java- and Kotlin- style programming and having a much broader follower base in Europe. Lack of outreach, concerted marketing, and advocacy from American companies that have always dominated the narrative.

nothrabannosir 4 days ago | parent | prev [-]

Python, PHP, Ruby: all not American though, right? Do you mean those only got hockey stick growth when they happened to get picked up by the USA ? But then couldn’t the same have happened for ocaml? And if so: why didn’t it, as it supposedly did for the others

Not to mention Linux I guess

StopDisinfo910 3 days ago | parent [-]

Von Rossum moved to the US and Python actually got US government funding pretty early. Lerdorf did PHP in Canada so America. Ruby is kind of the exception being Japanese but it’s pretty niche - nearly as much as Ocaml - and is mostly popular for Rails which was started from Denmark but by someone working for, you guessed it, a US company. Torvald announced Linux on a US usenet list and moved to California soon after.

Ocaml difference is that the core development is done by INRIA, a French public institution and the people in charge had zero interest in moving to the US or chasing the US market.

It’s funny because Ocaml became a bit more popular when people from the UK (Cambridge, JaneStreet) started doing more outreach.

IshKebab 4 days ago | parent | prev | next [-]

I agree. If OCaml had solved some of its bigger paper cuts it could have been a real player. Compilation time is much better than Rust too:

* OPAM is quite buggy and extremely confusing.

* Windows support is very bad. If you ever tried to use Perl on Windows back in the day... it's worse than that.

* Documentation is terse to the point of uselessness.

* The syntax style is quite hard to mentally parse and also not very recoverable. If you miss some word or character the error can be "the second half of the file has a syntax error". Not very fun. Rust's more traditional syntax is much easier to deal with.

Rust basically has none of those issues. Really the only advantage I can see with OCaml today is compile time, which is important, but it's definitely not important enough to make me want to use OCaml.

jll29 4 days ago | parent [-]

I'd say the Modula-2 inspired module system is a very valuable asset compared to today's Rust.

The only contact with OCaml I had was that I wrote a bug report to a university professor because I wanted his tool to process one of my files, but the file was larger than OCaml's int type could handle. That itself wasn't the problem - he wrote it wasn't straight forward to fix it. (This is a bug of the type "couldn't have happened in Common LISP". But I guess even in C one could replace int by FILE_SIYE_TYPE and #define it as unsigned size_t, for instance).

pjmlp 4 days ago | parent [-]

It is more the other way around ML predates Modula-2, and the module system like ideas were already present in Mesa and UCSD Pascal. :)

jll29 4 days ago | parent [-]

It's been a while since I used UCSD Pascal (in high school, on Apple II boxes with an extra hardware card), so I don't recall the details of the module system there but I'm pretty sure it did not back then permit separate compilation of definitions and implementation files as Modula-2 did (.def and .mod in Modula-2, respectively).

I also saw some ML/SML at uni in the early 1990s but no mention of modules then (this is not to say you are wrong, but I question how visible any work in that space was that may have existed). Now Mesa I never got my hands on, nor do I know anyone that did.

Modula-2 was popular e.g. on the Atari ST 520 series, I still have the handbook on my bookshelf next to me (the vendor of the compiler I had was called "Application Systems Heidelberg", founded in Germany in 1985 they now seem to have gone into gaming). This was a decent 32-bit compiler, and with 1 MB RAM you could write great applications when C compilers at the time were still insufficient in their ability to provide proper type checking support (pre-ANSI/ISO standardization).

Reddit has a discussion on Modula-2 and its family tree here: https://www.reddit.com/r/programming/comments/1cuam2p/what_e...

pjmlp 4 days ago | parent | prev | next [-]

That is why if I feel like doing ML style programing I rather reach out for Kotlin, Scala or F# than Rust, and even then Java and C# have gotten enough inspiration that I can also feel at home while using them.

I am no strage to ML type systems, my first one was Caml Light, OCaml was still known as Objective Caml, and Mirada was still something being discussed on programming language lectures on my university.

From what I see, I also kind of find the same, too many people rush out for Rust thinking that ML type systems is something new introduced by Rust, without having the background where all comes from.

michaelcampbell 3 days ago | parent [-]

> too many people rush out for Rust

Yes

> thinking that ML type systems is something new introduced by Rust

This feels off to me. Of the hype-train that Rust has been for a while now, a _type_ of type system it has hasn't been any of the cars, as it were.

At least in my readings; I'm sure we travel in different circles, but even the few academic oriented things have been other language features and memory safety through and through.

gerdesj 4 days ago | parent | prev | next [-]

"I feel if OCaml had got its act together ..."

The great thing is we have choice. We have a huge number of ways to express ideas and ... do them!

I might draw a parallel with the number of spoken languages extent in the UK (only ~65M people). You are probably familiar with English. There are rather a lot more languages here. Irish, Scottish, Welsh - these are the thriving Brythonic languages (and they probably have some sub-types). Cornish formally died out in the sixties (the last two sisters that spoke it natively, passed away) but it has been revived by some locals and given that living people who could communicate with relos with first hand experience, I think we can count that a language that is largely saved. Cumbric ... counting still used by shepherds - something like: yan, tan, tithera toe.

I am looking at OCAML because I'm the next generation to worry about genealogy in my family and my uncle has picked Geneweb to store the data, taking over from TMG - a Windows app. His database contains roughly 140,000 individuals. Geneweb is programmed in OCAML.

If you think that programming languages are complicated ... have a go at genealogy. You will soon discover something called GEDCOM and then you will weep!

DrewADesign 4 days ago | parent | next [-]

For personal projects? Sure. In nearly any development organization larger than one person, unilaterally deciding to use OCAML instead of what everybody else uses would go over about as well as unilaterally deciding to use Aramaic at meetings.

Akronymus 4 days ago | parent | prev | next [-]

From the gedcom wiki page it doesnt seem that bad. At least the data format itself. But it seems like its very easy to screw up working with it.

gerdesj 3 days ago | parent [-]

GEDCOM was developed by the Mormons and was not really designed to encompass the rich diversity of human relationships. You can seriously overload the notes fields!

Genealogy is really hard but it is important to not get too bogged down with formality and get the data stashed in one form or another. Genealogy "facts" decay with a horribly short half life. It is also important to accept all "facts" as is and not try to interpret them too much - that's something else.

I'm 55 years old and have memories dealing with my grandad on my mother's side who was born in 1901. So, within reason, I can record some second hand facts going back to very early C20. My parents were born 1942/3. etc etc. However, the gold standard is written evidence of a fact.

I think that genealogy really needs to discover systems like Elastic/Open Search and not try to coerce the data to a fixed schema.

Everyone thinks their family tree is a tree. No it really isn't - it's a thicket!

I have a relative that my uncle found from Padstow in Cornwall in C16 - her first born was probably a bastard fathered by the local squire's son. There's a soldier from WWI whom the family "knowledge" from around two generations ago was convinced he was a deserter. It turns out he was honorably discharged and emigrated to Canada. On of my G^5 dad died from septicemia after punching a window in a drunken pub brawl.

All of the above has documentary evidence, expect for the desertion thing, which turned out to be bollocks. Oh there is a good chance of a mass-murderer back in C18 near Devizes, Wiltshire!

This is where IT gets really interesting. How on earth do you go about genealogy data? You are sure to piss off someone(s) who want to wear the rose tinted specs and if you think modern politics are a bit challenging, why not try to deal with politics across centuries and the random weirdness that is your own family 8)

Akronymus 3 days ago | parent [-]

> How on earth do you go about genealogy data?

My extremely naive approach would a scheme where you have a header containing a list of used types of information fields, then a list of entries for people, then relationships (genealogical descendants, familial relationships with a start and end date (optional, YMD format, that you only fill in with as far as you know, so if you only know the year, you just set that.)) then a list of various events, then a list of supporting documents with a confidence value, where each document has a list of people and a list of events they are relevant to. then a list of basically freeform fields, that can link to events, documents, people, etc. where the types are defined in the header.

typing this out at 2 in the morning, so sorry for the incoherence.

beezlewax 4 days ago | parent | prev [-]

It's weird to see someone from the UK champion the Irish language as a choice as if they didn't try to systematically wipe it from the face of the earth for quite a long period of time.

Choice is good of course so do keep up the good work.

gerdesj 3 days ago | parent [-]

My grandad's family on my dad's side was driven out of Dublin by some folks who went on to set their house on fire, back in the day. They were warned off by a maid and legged it to England. A few generations earlier, on the same line, my ancestors were German immigrants to London.

I will upvote your comment nonetheless. I see it has been DVd which I don't like to see - we all have our views.

gerdesj 3 days ago | parent [-]

Incidentally. "WN" is quite well documented. Was there something similar in Ireland, before independence?

https://en.wikipedia.org/wiki/Welsh_Not

unstruktured 5 days ago | parent | prev | next [-]

There is absolutely no reason to use double semicolons in practice. The only place you really should see it is when using the repl.

sigzero 5 days ago | parent [-]

Yeah, it makes me think he doesn't understand them in OCaml.

acjohnson55 4 days ago | parent [-]

I worked in OCaml for a year and I couldn't tell you by memory what the difference was. I remember being very annoyed by OCaml's many language quirks.

munificent 4 days ago | parent | prev | next [-]

> I feel if OCaml had got its act together around about 2010 with multicore and a few other annoyances[1] it could have been Rust.

Arguably, that could have been Scala and for a while it seemed like it would be Scala but then it kind of just... didn't.

I suspect some of that was that the programming style of some high profile Scala packages really alienated people by pushing the type system and operator overloading much farther than necessary.

whimsicalism 4 days ago | parent [-]

Scala was always going to be hamstrung by the fact that it's a JVM language and yes, the crazy stuff people did with the language didn't help.

owlstuffing 4 days ago | parent [-]

I agree w that, but I think Scala has deeper problems.

It tries to be a better Java and a better OCaml at the same time. This split personality led to Scala’s many dialects, which made it notorious for being difficult to read and reason about, particularly as a mainstream language contender.

Above all, Scala is considered a functional language with imperative OOP qualities. And it more or less fits that description. But like it or not primarily functional languages don’t have a strong reputation for building large maintainable enterprise software.

That’s the quiet part no one says out loud.

It’s like how in academic circles Lisp is considered the most pure and most powerful of programming languages, which may be true. At the same time most real-world decision makers see it as unsuitable as a mainstream language. If it were otherwise, we’d have seen a Lisp contend with imperative langs such as Java, C#, TypeScript, etc.

I’ve always attributed this disconnect to the fact that people naturally model the world around them as objects with state — people don’t think functionally.

a day ago | parent | next [-]
[deleted]
vips7L 4 days ago | parent | prev | next [-]

To me Scala is first and foremost a research language. It’s even how it’s developed.

wink 4 days ago | parent | prev [-]

Scala unfortunately feels a lot like Perl. Three people write in four different styles.

I mean, that was my beginner impression and at least half of the Scala developers I asked about this agreed. Also I just never found the improvement over Java good enough, that wasn't worth all the downsides. This is even more true with modern Java or Kotlin. Same benefits but it's easier to read, not harder.

yodsanklai 4 days ago | parent | prev | next [-]

> aesthetically the double semicolons are an abomination and irk me far more.

I think they have been optional for like 20 years, except in the top-level interactive environment to force execution.

That being said, I still don't get why people are so much upset with the syntax. You'll integrate it after a week writing OCaml code.

swiftcoder 4 days ago | parent | next [-]

Erlang faces a similar uphill battle when it comes to syntax - there are three different punctuation marks used as terminators depending on context, and you have to keep in your head the rules for all 3. As someone who has written quite a bit of Erlang, but infrequently, it's always a battle.

And I think a big part of the reason that Elixir has done so well (Elixir pretty much starting out as Erlang-but-with-Ruby-syntax)

whimsicalism 4 days ago | parent | prev [-]

I spent more than a week writing ocaml and still found the syntax pretty annoying. ReasonML would have been nice if the Ocaml community actually cared, but they are a bit insular.

yawaramin 4 days ago | parent | next [-]

Reason syntax is fully supported by the OCaml ecosystem and has been for many years.

4 days ago | parent | prev [-]
[deleted]
shpongled 4 days ago | parent | prev | next [-]

As someone who loves SML/OCaml and has written primarily Rust over the past ~10 years, I totally agree - I use it as a modern and ergonomic ML with best-in-class tooling, libraries, and performance. Lifetimes are cool, and I use them when needed, but they aren't the reason I use Rust at all. I would use Rust with a GC instead of lifetimes too.

hawk_ 4 days ago | parent [-]

How do you use Rust without lifetimes?

legobmw99 4 days ago | parent | next [-]

Either a lot of clones or a lot of reference counted pointers. Especially if your point of comparison is a GC language, this is much less of a crime than some people think

shpongled 4 days ago | parent | prev [-]

When I mean "use" them, I mean make heavy use of them, e.g. structs or functions annotated with multiple lifetimes, data flows designed to borrow data, e.g. You can often get by just with `clone` and lifetime elision, and if you don't need to eke out that last bit of performance, it's fine.

troupo 5 days ago | parent | prev | next [-]

OCaml also needed the brief but bright ReasonML moment to add/fix/improve some of the syntax IIRC and work on user-friendly error messages. But this should've definitely happened much much earlier than it did.

Taikonerd 5 days ago | parent [-]

I would say ReasonML also needed more follow-through. It seems like the OCaml community hasn't really rallied behind it.

bsder 4 days ago | parent | next [-]

It doesn't help that the OCaml community also has the problem that a significant minority seem to resent the fact that one company (Jane Street) has written more OCaml than the the rest of the world combined and then some and so de facto controls the ecosystem.

Whereas the Go and Rust communities, for example, were just fine with having corporate sponsorship driving things.

debugnik 4 days ago | parent | next [-]

> and so de facto controls the ecosystem

They really don't, less than 5% of opam packages depend on Base and that's their bottom controversial dependency I'd say. Barely anyone's complaining about their work on the OCaml platform or less opinionated libraries. I admit the feeling that they do lingers, but having used OCaml in anger for a few years I think it's a non-issue.

What they do seem to control is the learning pipeline, as a newcomer you find yourself somewhat funneled to Base, Core, etc. I tried them for a while, but eventually understood I don't really need them.

Rapzid 4 days ago | parent | prev [-]

Golang is interesting.. Hasn't steering loosened up a bit in recent years?

But going way back while yeah the team at Google controlled the direction, there were some pretty significant contributions from outside to channels, garbage collection, and goroutines and scheduling..

mirekrusin 4 days ago | parent | prev [-]

Maybe it's good it died? Now we have moonbit lang.

troupo 4 days ago | parent | next [-]

Moonbit the fast, compact and user friendly language for WebAssembly? Or Moonbit the language for industrial usage? Or Moonbit the AI-native general-purpose programming language?

(They are the same language)

Reason at least was an active collaboration between several projects in the OCaml space with some feedback into OCaml proper (even though there was a lot of initial resistance IIRC).

mirekrusin 3 days ago | parent [-]

It's not only for wasm, compiles to native code as well [0].

[0] https://www.moonbitlang.com/blog/llvm-backend

theLiminator 4 days ago | parent | prev [-]

flix also looks pretty nice

77pt77 4 days ago | parent | prev | next [-]

> I feel if OCaml had got its act together around about 2010 with multicore and a few other annoyances[1] it could have been Rust

That's about the time-frame where I got into OCaml so I followed this up close.

The biggest hindrance in my opinion is/was boxed types.

Too much overhead for low level stuff, although there was a guy from oxbridge doing GL stuff with it.

debugnik 4 days ago | parent [-]

That's still the biggest hindrance in my opinion, at least for my use cases. OxCaml, Jane Street's fork, has some features for unboxed types and stack-based allocation of boxed types; hopefully it goes upstream.

ezst 4 days ago | parent | prev | next [-]

I feel that whatever "OCaml - the good parts" might be, it lives through Scala today. It's syntactically familiar/pleasing, it deals equally well with your high throughput (JVM), low-footprint (scala-native), web (scala-js/scala-wasm), small script to large monolith needs equally well, and its tooling/community support is orders of magnitude better than the other functional-first "popular" languages (OCaml, Haskell, Clojure, …).

4 days ago | parent | prev | next [-]
[deleted]
the__alchemist 5 days ago | parent | prev | next [-]

I'm with you. I think some of the nicest parts of rust have nothing to do with memory safety; they're ways to structure your program as you mention.

garbthetill 5 days ago | parent | prev | next [-]

doesnt rust still have the advantage of having no gc? I dont like writing rust, but the selling point of being able to write performative code with memory safety guarantees has always stuck with me

noelwelsh 5 days ago | parent | next [-]

I think "no gc but memory safe" is what originally got people excited about Rust. It's a genuinely new capability in production ready languages. However, I think Rust is used in many contexts where a GC is just fine and working with lifetimes makes many programs more painful to write. I think for many programs the approach taken by Oxidized OCaml[1] or Scala[2] gives 80% of the benefit while being a lot more ergonomic to work with.

When I see Rust topping the "most loved language" on Stack Overflow etc. what I think is really happening is that people are using a "modern" language for the first time. I consistently see people gushing about, e.g., pattern matching in Rust. I agree pattern matching is awesome, but it is also not at all novel if you are a PL nerd. It's just that most commercial languages are crap from a PL nerd point of view.

So I think "no gc but memory safe" is what got people to look at Rust, but it's 1990s ML (ADTs, pattern matching, etc.) that keeps them there.

[1]: https://github.com/oxcaml/oxcaml

[2]: https://docs.scala-lang.org/scala3/reference/experimental/cc...

voidhorse 4 days ago | parent | next [-]

Spot on. It's also fascinating to watch people have their minds blown in 2020+ by basic features that have been around since the nineties. It's kind of sad, actually. The industry would be in such a better place than it is today if so many programmers weren't allergic to all things academic and "theoretical" and were more curious and technical than they were conceited. It's baffling that computing, literally a subject area in which the theory quite literally is the practice, is so full of people who refuse to engage with theoretical work and research.

pjmlp 4 days ago | parent [-]

And eventually nothing of it will matter because our AI overlords will eventually translate natural language, maybe with some added help from formalisms, into any kind of application.

josephg 4 days ago | parent | prev | next [-]

> So I think "no gc but memory safe" is what got people to look at Rust, but it's 1990s ML (ADTs, pattern matching, etc.) that keeps them there.

Yeah; this is my experience. I've been working in C professionally lately after writing rust fulltime for a few years. I don't really miss the borrow checker. But I really miss ADTs (eg Result<>, Option, etc), generic containers (Vec<T>), tuples, match expressions and the tooling (Cargo).

You can work around a lot of these problems in C with grit and frustration, but rust just gives you good answers out of the box.

GeekyBear 5 days ago | parent | prev [-]

> I think "no gc but memory safe" is what originally got people excited about Rust.

I think it was more about "the performance of C, but with memory safety and data race safety".

inkyoto 4 days ago | parent | prev | next [-]

OCaml was[0] very popular in the high-frequency trade programming, especially because of its high performance and predictable latency despite having a garbage collector, plus, of course, because of the correctness of the code written in it.

OCaml's GC design is a pretty simple one: two heaps, one for short-lived objects and another one for the long-lived objects, and it is a generational and mostly non-moving design. Another thing that helps tremendously is the fact that OCaml is a functional programming language[1], which means that, since values are never mutated, most GC objects are short or very short-lived and never hit the other heap reserved for the long-lived objects, and the short-lived objects perish often and do so quickly.

So, to recap, OCaml’s GC is tuned for simplicity, predictable short pauses, and easy interoperability, whereas Java’s GC is tuned for maximum throughput and large-scale heap management with sophisticated concurrency and compaction.

[0] Maybe it still is – I am not sure.

[1] It is actually a multiparadigm design, although most code written in OCaml is functional in its style.

gf000 4 days ago | parent [-]

At the same time, OCaml has a very simplistic memory layout where even integers are boxed - Java at least has primitive types.

That surely has a performance cost.

dmpk2k 4 days ago | parent [-]

Are you sure about boxed integers? Perhaps you mean floats? As far as I know Ocaml uses the typical integer/pointer divide.

orthoxerox 4 days ago | parent [-]

IIRC it has 31-bit integers, which means you can't natively work with 32-bit data without widening.

zorobo 4 days ago | parent [-]

or 63 bits on 64 bit architectures.

vips7L 5 days ago | parent | prev | next [-]

You can write safe and performative code with a garbage collector. They're not mutually exclusive. It just depends on your latency and throughput requirements.

sieabahlpark 5 days ago | parent [-]

[dead]

0cf8612b2e1e 5 days ago | parent | prev [-]

Considering how many applications are running in JS/Python execution speed or GC is a low concern for many programs. Ergonomics (community, compiler guarantees, distribution, memory pressure, talent availability, whatever) seem more meaningful.

gf000 4 days ago | parent [-]

I get your point, but JS is an order of magnitude faster than Python, they are not in the same league.

A lot of effort went into making it efficient thanks to the web, while python sorta has its hands tied back due to exposing internals that can be readily used from C.

pjmlp 4 days ago | parent [-]

PyPy could get some community love, but I guess it will never happen, and on the GPU side, Python is basically a compiler DSL.

rtpg 4 days ago | parent | prev | next [-]

I think people like ADTs and pattern matching that Rust gives, but really the way that Rust becomes even more pleasant is that you have _so many_ trait methods on standard library objects that offer succinct answers to common patterns.

Haskell of course has some of this, but immutability means that Haskell doesn't have to have answers for lots of things. And you want pattern matching as your basic building block, but at the end of the day most of your code won't have pattern matching and will instead rely on higher level patterns (that can build off of ADTs providing some degree of certainty on totality etc)

ubercore 4 days ago | parent | prev | next [-]

I've only forayed into rust a bit, but I agree. I would happily take a language like Rust that sacrifices some speed for simpler semantics around ownership/lifetimes.

Just Arc, clone and panic your way to success! :)

omcnoe 4 days ago | parent | prev | next [-]

The issue regarding academia is that functional programming is treated as an afterthought/sideshow that is mainly of interest for research. Almost no-one is teaching FP concepts to undergrads.

uncircle 4 days ago | parent | next [-]

Before 2010-something, the very popular meme in software engineering was that functional programming is really hard to understand, and really not suited for anything outside of academia. [1] Now that I've been programming in an immutable functional language for almost a decade (Elixir), I'm certain the meme was mostly born out of unfamiliarity [2] than actual complexity; it's really not that much different than imperative, just requires a different approach and understanding of the trade-offs. Writing a distributed system (say, a web app backend) in an imperative, mutable language in this day and age is increasingly a laughable proposition in my view. Use the right tool for the problem at hand.

Many academically-trained developers never got exposed to FP in school, and to this day you can still hear, albeit in much lesser numbers thanks to the popularity of Elixir/Clojure/etc., the meme of FP being "hard" perpetuated.

---

1: I would go so far as to blame Haskell for the misplaced belief that FP means overcomplicated type theory when all you want is a for loop and a mutable data-structure.

2: I played with OCaml 10+ years ago, and couldn't make head or tails of it. I tried again recently, and it just felt familiar and quite obvious.

mrkeen 4 days ago | parent [-]

> the very popular meme in software engineering was that functional programming is really hard

> I'm certain the meme was mostly born out of unfamiliarity

> I would go so far as to blame Haskell for the misplaced belief that FP means overcomplicated type theory

uncircle 4 days ago | parent [-]

Am I supposed to hallucinate a reply from my own words? Say what you mean.

pjmlp 4 days ago | parent | prev [-]

I can assure you that wasn't the case on my degree, if anything almost every lecture had its own programming language.

Maybe I got lucky being in one of the most relevant universities in Portugal, however I can tell that others in the country strive for similar quality for their graduates, even almost 40 years later.

le-mark 4 days ago | parent | prev | next [-]

The way ocaml mashes the object syntax into sml was always most annoying to me. It was also pretty weak on the systems programming side (threads, sockets, signals, fork) 20-30 years ago iirc. That’s probably changed by now. Multi core; not many runtimes handle this today so that’s not much of a hindrance IME.

fulafel 4 days ago | parent | prev | next [-]

Anyone have a link to the Android talk? I wonder if it was backend code or on-device code. On device you could probably justify the compromises of a no-GC language better.

noelwelsh 4 days ago | parent [-]

I tracked it down: https://www.youtube.com/watch?v=QrrH2lcl9ew

I don't think it was on-device code, as they talked about porting Python projects. But you can watch the talk to see if I'm misremembering.

fulafel 3 days ago | parent [-]

Thanks!

In the transcript I found more talk about porting C++ and Go to Rust, without Python rewrite references... still interesting tidbits, like

"when we've rewritten systems from go into rust we've found that it takes about the same size team about the same amount of time to build it that is there's no loss in productivity when moving from go to rust "

lmm 4 days ago | parent | prev | next [-]

> I feel if OCaml had got its act together around about 2010 with multicore and a few other annoyances[1] it could have been Rust.

No, that wouldn't have made the difference. No-one didn't pick up OCaml because it didn't have multicore or they were annoyed by the semicolons.

People don't switch languages because the new language is "old language but better". They switch languages because a) new language does some unique thing that the old language didn't do, even if the unique thing is useless and irrelevant, b) new language has a bigger number than old language on benchmarks, even if the benchmark is irrelevant to your use case, or c) new language claims to have great interop with old language, even if this is a lie.

There is no way OCaml could have succeeded in the pop culture that is programming language popularity. Yes, all of the actual reasons to use Rust apply just as much to OCaml and if our industry operated on technical merit we would have migrated to OCaml decades ago. But it doesn't so we didn't.

brabel 4 days ago | parent [-]

I appreciate both OCaml and Rust, but your view seems to be entirely wrong to me, sorry to be blunt.

People wouldn't care much for Rust at all if it didn't offer two things that are an absolute killer feature (that OCaml does not have):

* no GC, while being memory safe.

* high performance on par with C while offering no-cost high level conveniences.

There's no other language to this day that offers anything like that. Rust really is unique in this area, as far as I know.

The fact that it also has a very good package manager and was initially backed by a big, trusted company, Mozzila, while OCaml comes from a Research Lab, also makes this particular race a no-brainer unless you're into Functional Programming (which has never been very popular, no matter the language).

lmm 4 days ago | parent [-]

>> a) new language does some unique thing that the old language didn't do, even if the unique thing is useless and irrelevant

>> b) new language has a bigger number than old language on benchmarks, even if the benchmark is irrelevant to your use case

> * no GC, while being memory safe.

> * high performance on par with C while offering no-cost high level conveniences.

My point exactly!

> was initially backed by a big, trusted company, Mozzila, while OCaml comes from a Research Lab

Mozilla is not large and trustworthy, as you can see by the fact they haven't kept funding Rust development (because they can't afford to)! People weren't picking Rust because it had better backing or a bigger ecosystem, not in the early stages that made the difference - it didn't.

sanderjd 4 days ago | parent | prev | next [-]

Yeah I was initially drawn to rust because I loved ocaml but wished it were more practical.

benreesman 5 days ago | parent | prev [-]

[flagged]

simonask 5 days ago | parent [-]

This is one of the wilder conspiracy theories to me, and that says a lot in 2025.

benreesman 5 days ago | parent [-]

The RESF is not a conspiracy theory, its a known thing. Especially on HN: https://news.ycombinator.com/item?id=14178950

the__alchemist 5 days ago | parent | next [-]

It's real, and as someone who loves rust, it's embarrassing, and difficult to avoid. The OSS embedded rust users in particular are nuts.

benreesman 5 days ago | parent [-]

Really appreciate a fairminded Rust person chiming in. It's a disservice to the language (which is cool!), and it makes the community look bad.

Rust might gain some adoption among people who are new to high performance software and see a narrative that its the only game in town, but it turns off a lot of older folks like myself who know it isn't and that community matters.

gl to you and people like you trying to get it back on track!

simonask 4 days ago | parent [-]

Can we be clear here: You are accusing people in this thread of "inorganically" bringing up Rust. The implication being that there is some shadowy group or organization coordinating the bombing of random forum threads to talk about Rust, or what are we saying here?

Rust is an exciting language. It comes up because many people like it.

simonask 4 days ago | parent | prev [-]

What is that link? A thread from 2017? What am I supposed to get from it?