News for hackers. Stuff that matters.
Re:Why Ada Is the Language You Want to Be Programming Your S... by ajxs on Tuesday September 10, 2019 @11:21PM (#20936303)
Ada is miles ahead of Rust when it comes to C interoperability. I posted this before in one of the other Rust threads, but you can't get more than two paragraphs through the official Rust FFI documentation ( https://doc.rust-lang.org/nomicon/ffi.html ) before being asked to install a third-party dependency. The 'Interfaces.C' package is defined in the Ada language specification. And, as others have mentioned, Ada's language defined pragma directives, or Ada2012's aspects provide a way to implement FFI.
Re:Why Ada Is the Language You Want to Be Programming Your S... by roca on Wednesday September 11, 2019 @01:40AM (#20936896)
There's nothing wrong with pulling in the `libc` dependency. It literally means adding two lines of code and then `cargo` manages everything for you. It isn't really third-party; the owner is "rust-lang:libs".

I understand that people are conditioned to think APIs are easier to consume when they're in the standard library, because that's true in many languages, especially those that lack a modern package management system (e.g. Ada). But it's not true in Rust and there are advantages to having libraries like `libc` outside the standard library. For example `libc` is updated more frequently than the Rust standard library (multiple times per month vs every six weeks).

Re:Why Ada Is the Language You Want to Be Programming Your S... by kragen on Wednesday September 11, 2019 @01:51AM (#20936952)
Having libc updated multiple times per month sounds like a fucking nightmare to me. What am I missing about this situation?
Re:Why Ada Is the Language You Want to Be Programming Your S... by ajxs on Wednesday September 11, 2019 @02:46AM (#20937226)
I actually laughed at this comment. I was wondering the same thing. Although this is a cheap shot, how could I resist mentioning that Ada's FFI functionality is updated every 20 years on average and is still ahead of the curve.
Re:Why Ada Is the Language You Want to Be Programming Your S... by OneWingedShark on Monday September 16, 2019 @10:59AM (#20984723)
> There's nothing wrong with pulling in the `libc` dependency.

Yes, there is. Not only is dependency transitive: you now depend on everything libc depends on — but now you're depending on the correctness AND properties of the dependency, to include security.