From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada vs. Rust for low level system software
Date: Wed, 13 Dec 2023 10:53:28 +0100 [thread overview]
Message-ID: <ulbuup$3t8p$1@dont-email.me> (raw)
In-Reply-To: <ulbsds$3foc$1@dont-email.me>
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
next prev parent reply other threads:[~2023-12-13 9:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-12-13 8:44 ` Jeffrey R.Carter
2023-12-18 12:52 ` Kevin Chadwick
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox