5 ms·
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 c
by nine_k 1y ago
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).
- hardwaregeek 1y agoWouldn’t Kotlin be a more reasonable choice in that case? It has ADTs and a lot of the same niceties of Rust.
- actionfromafar 1y agoGarbage collector in Kotlin makes it a no go for C or C++ displacement.
- pjmlp 1y agoAs 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.
- Artamus 1y agoI'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 1y agoYes. 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 1y agoI 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.
- deleted 1y ago[deleted]
- pjmlp 1y agoJava 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 1y agoBlame Oracle. If they had been more forward looking and a bit less greedy, Java vLatest would be the default language on Android.
- pjmlp 1y agoNot 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.
- rendaw 1y agoI 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.
- swiftcoder 1y agoPotentially, but Kotlin is even more recent that Rust, and didn't get blessed internally at Google till somewhat later
- michaelcampbell 1y agoKotlin 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.
- deleted 1y ago[deleted]
- GhosT078 1y agoIn 2010, Ada 2005 was the most bare-metal-worthy expressive language. Now that would be Ada 2022.
- nine_k 1y agoWhile 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.
- rz2k 1y agoTake a look here: https://news.ycombinator.com/item?id=7824570 https://news.ycombinator.com/item?id=7824570
- pjmlp 1y agoThere 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.adacore.com/ https://www.ghs.com/products/ada_optimizing_compilers.html https://www.ghs.com/products/ada_optimizing_compilers.html https://www.ptc.com/en/products/developer-tools/apexada https://www.ptc.com/en/products/developer-tools/apexada https://www.ddci.com/products_score/ https://www.ddci.com/products_score/ http://www.irvine.com/tech.html http://www.irvine.com/tech.html http://www.ocsystems.com/w/index.php/OCS:PowerAda http://www.ocsystems.com/w/index.php/OCS:PowerAda http://www.rrsoftware.com/html/prodinf/janus95/j-ada95.htm 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.