* Ada vs. Rust for low level system software
@ 2023-12-13 4:28 Nasser M. Abbasi
2023-12-13 8:27 ` Dmitry A. Kazakov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Nasser M. Abbasi @ 2023-12-13 4:28 UTC (permalink / raw)
Has anyone made study of difference between Rust and Ada for low level hardware
system software?
Since Ada is mainly used in this area, why has Rust, which is much
younger language, and target this same area has gained so much
popularity but not Ada?
https://dl.acm.org/doi/fullHtml/10.1145/3551349.3559494
"Rust is a rising programming language designed to build system
software [4, 10, 20]. On the one hand, Rust offers access to and control
of the low-level system resources. On the other hand,
unlike conventional systems programming languages, Rust
ensures memory and concurrency safety"
"Rust often inserts bound checks at the execution time to rule
out out-of-bound accesses"
Well, does not Ada also "ensures memory and concurrency safety"
and checks for out-of-bound accesses?
I am just wondering what does Rust brings to the table that
Ada does not have and why is Rust becoming so popular when
Ada is not.
I never used Rust myself, but used Ada.
Any one done study comparing the two languages or knows
both that can give some comments on this?
--Nasser
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ada vs. Rust for low level system software
2023-12-13 4:28 Ada vs. Rust for low level system software Nasser M. Abbasi
@ 2023-12-13 8:27 ` Dmitry A. Kazakov
2023-12-13 9:10 ` Luke A. Guest
2023-12-13 8:44 ` Jeffrey R.Carter
2023-12-18 12:52 ` Kevin Chadwick
2 siblings, 1 reply; 6+ messages in thread
From: Dmitry A. Kazakov @ 2023-12-13 8:27 UTC (permalink / raw)
On 2023-12-13 05:28, Nasser M. Abbasi wrote:
> Has anyone made study of difference between Rust and Ada for low level
> hardware
> system software?
What for? Any language comparisons lost their meaning long ago as the
whole language business degraded into hobbyist/corporate bullshit.
> Since Ada is mainly used in this area, why has Rust, which is much
> younger language, and target this same area has gained so much
> popularity but not Ada?
Because it is always someone's arbitrary decision.
> https://dl.acm.org/doi/fullHtml/10.1145/3551349.3559494
>
> "Rust is a rising programming language designed to build system
> software [4, 10, 20]. On the one hand, Rust offers access to and control
> of the low-level system resources. On the other hand,
> unlike conventional systems programming languages, Rust
> ensures memory and concurrency safety"
>
> "Rust often inserts bound checks at the execution time to rule
> out out-of-bound accesses"
>
> Well, does not Ada also "ensures memory and concurrency safety"
> and checks for out-of-bound accesses?
>
> I am just wondering what does Rust brings to the table that
> Ada does not have and why is Rust becoming so popular when
> Ada is not.
In my view Rust brings nothing and moreover is a huge step back
comparing to Ada. Its main and only idea is to force the programmer to
explicitly manage memory through references where Ada simply uses object
notation regardless the mechanism doing same under the hood.
Safety comes not through references but by limiting the number of cases
you must resort to using dynamic allocation for statically scoped
objects. E.g. Unbounded_String in Ada.
As for my major concern - the type system and the abstraction mechanisms
in general, there is nothing in Rust at all.
Then of course Rust continues the worst practices tried by Ada and C++:
templates/generics, macros.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ada vs. Rust for low level system software
2023-12-13 4:28 Ada vs. Rust for low level system software Nasser M. Abbasi
2023-12-13 8:27 ` Dmitry A. Kazakov
@ 2023-12-13 8:44 ` Jeffrey R.Carter
2023-12-18 12:52 ` Kevin Chadwick
2 siblings, 0 replies; 6+ messages in thread
From: Jeffrey R.Carter @ 2023-12-13 8:44 UTC (permalink / raw)
On 2023-12-13 05:28, Nasser M. Abbasi wrote:
> Has anyone made study of difference between Rust and Ada for low level hardware
> system software?
You might be interested in this discussion:
https://www.reddit.com/r/ada/comments/18c2nr4/where_is_ada_safer_than_rust/
--
Jeff Carter
"I used to manufacture escalator shoes for people
who were nauseous in elevator shoes."
Take the Money and Run
142
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ada vs. Rust for low level system software
2023-12-13 8:27 ` Dmitry A. Kazakov
@ 2023-12-13 9:10 ` Luke A. Guest
2023-12-13 9:53 ` Dmitry A. Kazakov
0 siblings, 1 reply; 6+ messages in thread
From: Luke A. Guest @ 2023-12-13 9:10 UTC (permalink / raw)
On 13/12/2023 08:27, Dmitry A. Kazakov wrote:
> What for? Any language comparisons lost their meaning long ago as the
> whole language business degraded into hobbyist/corporate bullshit.
True.
>> Since Ada is mainly used in this area, why has Rust, which is much
>> younger language, and target this same area has gained so much
>> popularity but not Ada?
I would say because they aimed to be a C++ replacement.
> Because it is always someone's arbitrary decision.
True.
> Then of course Rust continues the worst practices tried by Ada and C++:
> templates/generics, macros.
What's the alternative to generics?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ada vs. Rust for low level system software
2023-12-13 9:10 ` Luke A. Guest
@ 2023-12-13 9:53 ` Dmitry A. Kazakov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry A. Kazakov @ 2023-12-13 9:53 UTC (permalink / raw)
On 2023-12-13 10:10, Luke A. Guest wrote:
> On 13/12/2023 08:27, Dmitry A. Kazakov wrote:
>> Then of course Rust continues the worst practices tried by Ada and
>> C++: templates/generics, macros.
>
> What's the alternative to generics?
The question is what is the alternative to static/parametric
polymorphism. The answer is dynamic polymorphism.
1. Dynamic polymorphism in Ada is as static as generics are. No run-time
penalty unlikely to C++.
2. It covers cases generics do not, e.g. you can have class-wide
run-time objects and proper class-wide subprograms.
3. It supports modular programming en large. E.g. you can put a class
member in a dynamically linked library.
4. It is fully testable. Generics are fundamentally non-testable, only
concrete instances are.
5. It is does not create a meta language layer with complexities for the
compiler and programmer. Advanced generic code is close to unmaintainable.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ada vs. Rust for low level system software
2023-12-13 4:28 Ada vs. Rust for low level system software Nasser M. Abbasi
2023-12-13 8:27 ` Dmitry A. Kazakov
2023-12-13 8:44 ` Jeffrey R.Carter
@ 2023-12-18 12:52 ` Kevin Chadwick
2 siblings, 0 replies; 6+ messages in thread
From: Kevin Chadwick @ 2023-12-18 12:52 UTC (permalink / raw)
>Since Ada is mainly used in this area, why has Rust, which is much
>younger language, and target this same area has gained so much
>popularity but not Ada?
>
Adas ranged type system coupled with it's excellent record overlays make Ada
a much better choice than Rust. For safe and easy hardware register and
network protocols.
I can't imagine that ownership for data structures on a single runtime is
the reason (before SPARK got support).
A lot of Ada code will not run on any runtime but Rust also has nostd for
embedded use.
They often say Rust has excellent C interfacing support but Adas appears to
be even better.
Perhaps it is ease of use and guide availability which has improved or
simply perception and a lack of knowledge about Ada.
Rather than language merits. A lot of people only care about job
availabilty, money and library availability today but might consider a risk
if they perceive a future demand increase.
As to why the likes of Google and Microsoft are putting money behind it when
Ada would have been a better investment. You would have to ask them. Tell
me why Google continues to write security sensitive code like matter in
C++? When it could be written in Ada or Rust with a C binding.
Even javascript engines like Mozillas spidermonkey still has so little Rust
code. Though Mozilla does have more financial concerns and it's competitors
are already trying to say their browsers are faster. Yet Googles websites
use umpteen domains slowing browsing down anyway.
--
Regards, Kc
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-18 12:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13 4:28 Ada vs. Rust for low level system software Nasser M. Abbasi
2023-12-13 8:27 ` Dmitry A. Kazakov
2023-12-13 9:10 ` Luke A. Guest
2023-12-13 9:53 ` Dmitry A. Kazakov
2023-12-13 8:44 ` Jeffrey R.Carter
2023-12-18 12:52 ` Kevin Chadwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox