5 ms·
I think Rust is the clear winner for OS-level programming. I'm not at all sure that it's the right solution for application-level programming. I think Go got
by curtis 8y ago
I think Rust is the clear winner for OS-level programming. I'm not at all sure that it's the right solution for application-level programming. I think Go got two things right for the statically compiled application-level space: Fast compile times and garbage collection. Of course I feel like they got everything else wrong [1], but that's what we've got in that space right now. I think that D might be a much better fit for this space, but it doesn't matter because Go has sucked up all the oxygen.
[1] I realize that this is not a universally held opinion, but it certainly seems to be pretty widely held.
- kqr 8y agoHow does Rust have a clear hand over Ada?
- nine_k 8y agoMmm.. lifetimes analysis? I'm no expert in either Ada or Rust, but I _suspect_ that type system is more expressive in Rust, allowing for more precise static constraints. Ada, of course, has decades of prod experience, though.
- pjmlp 8y agoRust isn't as expressive as SPARK, which got merged back into Ada 2012.
- elcritch 8y agoNot familiar with the deps of Ada memory management. It has a form of checked RAII, but no idea if it’s done via linear types. However Ada still has a more sophisticated type system for refined typed, aka sub-integer or float types. See [0] for a discussion on Rust issues. If you combine Ada with Spark you get some (still) amazing compile type proof checking of projects. [1] Rust _could_ develop to have similar abilities (I hope!). But it’d need more generalized linear types or dependent types. Though one could write macros with stargeted higher level type checking DSL for, say, embedded development targets. 0: https://github.com/rust-lang/rfcs/issues/671 https://github.com/rust-lang/rfcs/issues/671 1: https://docs.adacore.com/spark2014-docs/html/ug/en/source/type_contracts.html https://docs.adacore.com/spark2014-docs/html/ug/en/source/ty...
- girvo 8y agoCommunity. That’s the big answer. Even if Ada is better, Rust has mindshare.
- jnbiche 8y agoRust's cutting edge compiler is free, for one thing. I love Ada, but Adacore may well have killed any chance it had of being a commercially viable language (its use declines precipitously each year, even in the defense and avionics industries where it used to be strong). Plus, Rust has a thriving community whereas thanks to Adacore, Ada has a dying one. Community is critical for programming languages. But otherwise, Ada is a brilliant and ultra safe language whose safety features go far beyond the memory and type safety that Rust features. It's a shame.
- rwallace 8y agoHow did Adacore kill Ada?
- pjmlp 8y agoIf anything Adacore has helped Ada a lot. It is the only Ada compiler available for free, fully updated to Ada 2012, with all the remaining ones are still on their 90's style prices. https://www.ptc.com/en/products/developer-tools/objectada https://www.ptc.com/en/products/developer-tools/objectada https://www.ghs.com/products/ada_optimizing_compilers.html https://www.ghs.com/products/ada_optimizing_compilers.html https://www.ddci.com/products_score/ https://www.ddci.com/products_score/ (frozen in Ada 95) Thanks to them Ada has become a regular presence at FOSDEM and is being teached at quite a few European university.
- dbaupp 8y agoOne technical reason is Rust has safe dynamic (de)allocation (and without a GC), whereas I believe Ada misses that large segment of the "market" (it theoretically allows a GC, but IIRC the implementations do not support that meaningfully). I could be wrong, but I don't think there's anything quite to the same degree in Ada but missing from Rust.
- pjmlp 8y agoAda has RAII via controlled types and allows for memory pools. Also Ada allows for compiler assisted runtime allocation. For example, you can declare a datastructure with the size you want, and if it fits the stack it will be allocated, otherwise you get an exception. Deallocation C style requires the Uncheked_Deallocation package. Ada 95 removed GC from the standard, as no compiler ever bothered to implement it. Here is an overview presented at FOSDEM 2016. https://archive.fosdem.org/2016/schedule/event/ada_memory/ https://archive.fosdem.org/2016/schedule/event/ada_memory/ With SPARK and Ada 2012, Ada allows for better security constraints than Rust. "Real-Time Critical Systems: HRM Prototype & Ada Integration" https://www.amazon.com/Real-Time-Critical-Systems-Prototype-Integration-ebook/dp/B07986YGNM https://www.amazon.com/Real-Time-Critical-Systems-Prototype-...
- VHRanger 8y agoGo certainly has a very focused marketing effort. They even have branding best practices and so on. Of course, Google, being an advertisement company, has a lot of know how in that area. Too bad Go is being held back by Rob Pike's ego, in my opinion.
- jstewartmobile 8y agoWhat's so bad about Rob's ego? If you want a language by people who say yes! to everything, we already have C++ and C#.
- _yawn 8y agoYou can have lots of expressivity without having that many features. But go has neither, and things like no operator overloading just plain sucks when dealing with vectors, for example.
- _yawn 8y agoDo you mean winner in terms of popularity or in terms of quality? In terms of popularity, it's pretty clear we are in for at least a decade of C++ & Javascript.
- pjmlp 8y agoThankfully Java and .NET are finally making AOT also part of the standard toolchain, instead of depending on third parties. Including compilation to WebAssembly as target.
- CyberDildonics 8y agoThat's been a common thread about java for 20 years
- nine_k 8y agoJS, Python and Ruby have zero compile times and GC; at least JS and Python 3 have a reasonable and widely understood approach to concurrency (if not true parallelism). Kotlin has reasonable compile times, GC of course, and also a reasonable concurrency story. Go apparently has other special features, like making a single binary, and having very low-delay GC. Also, it's very simple; it's basically a pared-down Modula-2 with the Oberon's methods thrown in. It also got non-fitting magic features added, like returning two values (not a tuple), or built-in generic functions (like `make(chan)`) without generics anywhere else, etc. These do not fit well, which makes many people sad.
- stewbrew 8y agoJS, Python, or Ruby have zero ahead of time compile & link time. They need some time to generate byte code, to compile the code "just in time", to load source or byte code from disk etc.
- nepeckman 8y agoI'm curious, what are your thoughts on Nim? I've used it a little, and compile has always seemed fast. It has garbage collecting on by default, and other language niceties. I feel like it fairs pretty well as an application language.