News for hackers. Stuff that matters.
Re:How I Came to Write D (2014) by kqr on Sunday June 03, 2018 @04:47PM (#17221849)
How does Rust have a clear hand over Ada?
Re:How I Came to Write D (2014) by jnbiche on Sunday June 03, 2018 @11:11PM (#17224284)
Rust'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.

Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @04:20AM (#17225614)
If 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.ghs.com/products/ada_optimizing_compilers.html

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.

Re:How I Came to Write D (2014) by abiox on Monday June 04, 2018 @12:36PM (#17229577)
according to wikipedia, their 'free' compiler is GPL without a linking exception. the comparison chart on their page also says it is 'for open source GPL software'.
Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @02:04PM (#17230379)
Apparently people keep forgetting without GPL, Linux would never happened.
Re:How I Came to Write D (2014) by jnbiche on Monday June 04, 2018 @10:17PM (#17234456)
GPL for an OS is I've thing. GPL for a compiler and runtime is entirely another, since only the latter forces any project you create with it too carry the GPL license.
Re:How I Came to Write D (2014) by pjmlp on Tuesday June 05, 2018 @03:48AM (#17235689)
Ah you mean gcc, the compiler that everyone ignored until Sun started the trend of UNIX vendors to charge for their compilers.
Re:How I Came to Write D (2014) by jnbiche on Tuesday June 05, 2018 @08:47PM (#17243503)
GPL's runtime isn't GPL, it's got the runtime exception:

https://www.gnu.org/licenses/gcc-exception-3.1.en.html

Re:How I Came to Write D (2014) by jnbiche on Wednesday June 06, 2018 @07:04AM (#17246010)
Sorry, I meant GCC's runtime isn't GPL.
Re:How I Came to Write D (2014) by CyberDildonics on Tuesday June 05, 2018 @01:05PM (#17239702)
No one is arguing that there is a place for the GPL.
Re:How I Came to Write D (2014) by rwallace on Monday June 04, 2018 @01:04AM (#17224808)
How did Adacore kill Ada?
Re:How I Came to Write D (2014) by dbaupp on Monday June 04, 2018 @02:29AM (#17225134)
One 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.
Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @04:14AM (#17225581)
Ada 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/

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-...

Re:How I Came to Write D (2014) by girvo on Sunday June 03, 2018 @09:52PM (#17223889)
Community. That’s the big answer. Even if Ada is better, Rust has mindshare.
Re:How I Came to Write D (2014) by nine_k on Sunday June 03, 2018 @09:14PM (#17223685)
Mmm.. 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.

Re:How I Came to Write D (2014) by elcritch on Monday June 04, 2018 @04:48AM (#17225771)
Not 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 1: https://docs.adacore.com/spark2014-docs/html/ug/en/source/ty...

Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @04:23AM (#17225638)
Rust isn't as expressive as SPARK, which got merged back into Ada 2012.