# How to inherit string handling?

**URL:** <https://forum.ada-lang.io/t/how-to-inherit-string-handling/791>\
**Category:** General\
**Created:** [April 22, 2024, 8:16am UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791 "2024-04-22T08:16:08Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [November 28, 2024, 4:13pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/21 "2024-11-28T16:13:36Z")

</div>

> [@dmitry-kazakov](#):
>
> However, I am afraid that the proposal still lacks being inheritance proper.

I mean, it’s at the pre-model stage —that is, we need good models— so describe what you mean by “inheritance proper”. (I don’t think that ‘inheritance’ is related to the problem at all, unless you are referring to the ability to say “X is a Y, with these additional properties.”)

> [@dmitry-kazakov](#):
>
> You must be able to inherit from an abstract array and pass it where array is expected.

?  
I think you’re thinking backwards to what the proposal is saying: an array would be an instance of that abstract interface for arrays, yes; but it would be invalid to have that abstraction (e.g.) as a parameter or as an object…like I said, “turning the formal parameters [of a generic] inside-out”: instead of being able to qualify and build types by static-polymorphism, allowing a type to reference/conform to the given interface.

So, while it would be fine to say `Integer` is a `Discrete` is an `Any_type`, and use `Integer` where appropriate, this isn’t necessarily like `Interface`: it’s static, for one, and requires no “buy-in” on dispatch or tagging.

> [@dmitry-kazakov](#):
>
> And surely it would simplify SPARK as you would inherit predicates proven to be true on the interface you inherit from.

That is one of the big motivating factors, that and how unwieldy it is to use user-defined indexing… the number of additional things you have to attend to for user-defined indexing is ridiculous.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 28, 2024, 4:37pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/22 "2024-11-28T16:37:17Z")

</div>

> [@OneWingedShark](#):
>
> I don’t think that ‘inheritance’ is related to the problem at all, unless you are referring to the ability to say “X is a Y, with these additional properties.

What else it could be?

> [@OneWingedShark](#):
>
> instead of being able to qualify and build types by static-polymorphism

I want generics removed from the language. There must be no classes without class-wide objects.

---

<div class="post-metadata">

**Author:** ![jere](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/jere/32/87_2.png) [@jere](https://forum.ada-lang.io/u/jere)\
**Post date:** [November 28, 2024, 5:58pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/23 "2024-11-28T17:58:15Z")

</div>

> [@dmitry-kazakov](#):
>
> What else it could be?

You can also do it via traits (which are not not inheritance nor type extension) (NOTE: not the same as traits packages, different concept), though current Ada has no concept of this kind of implementation (some other languages do, Rust comes to mind off the top of my head).

A trait is essentially a way of expressing that a procedure can accept anything that provides an implementation that fulfills a specific contract. And that contract itself is a first class type of its own, passed in as a parameter. You can emulate this in Ada via interfaces (which do use inheritance, but inheritance is not a requirement to implement this in general, it’s just how Ada chose to do it).

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 28, 2024, 6:05pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/24 "2024-11-28T18:05:52Z")

</div>

> [@jere](#):
>
> You can also do it via traits (which are not not inheritance nor type extension) (NOTE: not the same as traits packages, different concept), though current Ada has no concept of this kind of implementation (some other languages do, Rust comes to mind off the top of my head).

Is-a is being a member of a class. You can turn it any way you want. It is always classes and properties of = interfaces. You inherit at least the interface.

> [@jere](#):
>
> A trait is essentially a way of expressing that a procedure can accept anything that provides an implementation that fulfills a specific contract

Which means exactly: the procedure accepts members of a class of implementations of an interface.

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [November 28, 2024, 6:07pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/25 "2024-11-28T18:07:58Z")

</div>

> [@dmitry-kazakov](#):
>
> I want generics removed from the language.

Why?  
Generics are quite well done.  
I’d much rather remove dot-notation for objects (merely syntax) than generics; the proper way to achieve code-reuse **is** generics, not OOP.

> [@jere](#):
>
> You can also do it via traits

That proposal has been described as a traits-system.

---

<div class="post-metadata">

**Author:** ![jere](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/jere/32/87_2.png) [@jere](https://forum.ada-lang.io/u/jere)\
**Post date:** [November 28, 2024, 6:16pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/26 "2024-11-28T18:16:06Z")

</div>

> [@dmitry-kazakov](#):
>
> Is-a is being a member of a class. You can turn it any way you want. It is always classes and properties of = interfaces. You inherit at least the interface.

Yes, but the point was you don’t have to do it through “is-a”, you can do it through “acts-like-a” which doesn’t require membership to a class. It can be a separate thing.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 28, 2024, 6:16pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/27 "2024-11-28T18:16:50Z")

</div>

> [@OneWingedShark](#):
>
> Generics are quite well done.

As I said, no classes without objects. I don’t want macro expansions and no metalanguage inside the language.

> [@OneWingedShark](#):
>
> I’d much rather remove dot-notation for objects (merely syntax) than generics; the proper way to achieve code-reuse **is** generics, not OOP.

That generics (AKA macro expansions) do not support reuse is another argument against them. As an example write a program that prints any vector instantiated from the standard library. Put it in a DLL. When ready, talk about reuse! 🕶

You cannot reuse something that does not exist in the object language. Generic object is not an object. Generic procedure is not a procedure. Generic type (inside a generic package) is not a type etc.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 28, 2024, 6:29pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/28 "2024-11-28T18:29:28Z")

</div>

> [@jere](#):
>
> Yes, but the point was you don’t have to do it through “is-a”, you can do it through “acts-like-a” which doesn’t require membership to a class. It can be a separate thing.

No. Acts-like-a is a **member** of the **class** of all things **that act like a**. As I said, there is simply no other way.

In Ada act-like-a is called **interface**. There is no implementation just definition of methods = acting things.

The point is always whether instances of the class are first-class citizens (no pun intended). Poor languages and paradigms (e.g. parametric polymorphism) limit class to a foot note in the reference manual, like integer class or instances of generics in Ada. There is a class but no class-wide objects.

That is a language bug. Integer is not a big loss as you cannot derive from integer type without cloning. Each time you do:

```ada
type I is new Integer;

```

you get a new integer class hierarchy rooted in I’Base with only one member inside. But if you tried to put several integer types into one class, e.g. having different implementation, you would not be able to do that.

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [November 28, 2024, 7:17pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/29 "2024-11-28T19:17:49Z")

</div>

> [@dmitry-kazakov](#):
>
> I don’t want macro expansions

> [@dmitry-kazakov](#):
>
> That generics (AKA macro expansions) do not support reuse is another argument against them.

Generics aren’t macro-expansions.  
There are compilers that do shared generics.

> [@dmitry-kazakov](#):
>
> As an example write a program that prints any vector instantiated from the standard library. Put it in a DLL. When ready, talk about reuse! 🕶

The crippled shared-library notion stemming from OSes being written in C isn’t a good counter-example; IIUC, IBM’s SOM was capable of sharing on the generic-level. (IBM’s OS/2 was SOM capable, but did DLLS for compatibility with microsoft.)

> [@jere](#):
>
> Yes, but the point was you don’t have to do it through “is-a”, you can do it through “acts-like-a” which doesn’t require membership to a class. It can be a separate thing.

There is some overlap, to be sure, but I rather agree: you can use the behaviors and “shape” of a thing, completely independent of any heiarchy.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 28, 2024, 7:59pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/30 "2024-11-28T19:59:24Z")

</div>

> [@OneWingedShark](#):
>
> Generics aren’t macro-expansions.  
> There are compilers that do shared generics.

Of course you can macro optimize expansions by factoring out some code.

> [@OneWingedShark](#):
>
> The crippled shared-library notion stemming from OSes being written in C isn’t a good counter-example

Cool, recompile and re-link the OS, all libraries, compilers, drivers each time you change your program! Even MS-DOS was better!

I think we can thus agree that generics are incompatible with any computing model dated later than 50’s of previous century! 🤣

But you evaded the question. What about writing a vector print procedure?

---

<div class="post-metadata">

**Author:** ![jere](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/jere/32/87_2.png) [@jere](https://forum.ada-lang.io/u/jere)\
**Post date:** [November 28, 2024, 11:38pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/31 "2024-11-28T23:38:46Z")

</div>

> [@dmitry-kazakov](#):
>
> No. Acts-like-a is a **member** of the **class** of all things **that act like a**. As I said, there is simply no other way.

It can be a member, and you may prefer it to be a member, but there is no requirement for it to be a member of the class. You can have “act-like-a” implementations that are in no way members of a class (see traits in Rust and similar languages).

In Ada, since interfaces are implemented via type extension/inheritance, then derived objects form an “is-a” relationship. It is definitely possible to implement interfaces as “act-like-a” but that wasn’t the implementation chosen by the ARG. In Ada if you implement an interface, that type “is” a child of that interface.

Note, I am not saying one way is better or worse than the other, just nothing there are alternatives.

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [November 29, 2024, 2:36am UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/32 "2024-11-29T02:36:49Z")

</div>

> [@dmitry-kazakov](#):
>
> Cool, recompile and re-link the OS, all libraries, compilers, drivers each time you change your program! Even MS-DOS was better!

That’s not what I said.  
What I said was that the OS designs are crippled because (turing-completeness notwithstanding) such a feature is literally inexpressible in C.

Another concept that OSes don’t do, again because of the C influence, is subtype constraints — though here you can point to ASN.1 as a counterexample, thought it’s not on the OS-level.

> [@dmitry-kazakov](#):
>
> But you evaded the question. What about writing a vector print procedure?

I answered: DLLs are not capable exactly because the capability is inconceivable in C. — To have what you’re suggesting _is_ doable, but with a library system that is more featureful than can be expressed in the world of DLLs (or SO for linux.

> [@jere](#):
>
> Note, I am not saying one way is better or worse than the other, just nothing there are alternatives.

I get what you’re saying.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 29, 2024, 8:22am UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/33 "2024-11-29T08:22:43Z")

</div>

> [@jere](#):
>
> You can have “act-like-a” implementations that are in no way members of a class

You defined a class by merely saying act-like-a.

> [@jere](#):
>
> In Ada, since interfaces are implemented via type extension/inheritance

Generic classes are implemented without type extension.

> [@jere](#):
>
> Note, I am not saying one way is better or worse than the other, just nothing there are alternatives.

There is no alternatives to classes /= tagged types. When talking about classes please distinguish a concrete implementation, e.g. tagged type from a mathematical/logical concept of a set of types sharing some properties.

Tagged types is a very limited model of a set of types suffering many problems, from forcing implementation inheritance to lack of MI and MD. It does not mean that there may exist a paradigm alternative to class. It would be just a different way to implement class, usually even more inferior than tagged types, e.g. see generic classes or ad-hoc classes introduced by overloading.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 29, 2024, 8:31am UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/34 "2024-11-29T08:31:33Z")

</div>

> [@OneWingedShark](#):
>
> I answered: DLLs are not capable exactly because the capability is inconceivable in C.

Write procedure Print in Ada without putting it into a DLL!

P.S. The point about DLL was merely to indicate that generics do not support elementary means of reuse, modularisation, deployment and maintenance, like DLLs.

Once pre-processor is always pre-processor.

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [November 29, 2024, 4:30pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/35 "2024-11-29T16:30:58Z")

</div>

> [@dmitry-kazakov](#):
>
> Write procedure Print in Ada without putting it into a DLL!

```ada
Generic
   Type Element(<>) is private;
   with package Vector is new Ada.Containers.Indefinite_Vectors
   (Element_Type => Element, others => <>);
   with Function Image(Object : Element) return String;
   with Procedure Print(Object : String);
Procedure Generic_Print(Object : Vector.Vector);
Procedure Generic_Print(Object : Vector.Vector) is
Begin
  for Item of Object loop
      Print( Image(Item) );
   End loop;
End Generic_Print;

```

As it stands `Generic_Print` is _not_ a procedure, but the thing from which those procedures are made; _however_. because Ada allows shared-generics, said functionality could be defined as part of an OS’s library system: there you would be able to use it just as instantiation allows you to use it in Ada as a “_given **X** parameters, do **Y** thing._” function returning a subprogram.

Hell, if the abstractions on data-type and interfaces were in-play, you could re-use that entire subsystem plus generics to make the instantiation-engine for said library-system.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 29, 2024, 4:51pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/36 "2024-11-29T16:51:16Z")

</div>

> [@OneWingedShark](#):
>
> As it stands `Generic_Print` is _not_ a procedure

Yep, that is.

Shared implementation is indicative. The compiler can do that (\*), but **you** cannot.

(\*) I am not sure if it still true with all new language additions. So far GNAT cannot even guarantee that little as when generic body compiles then no instantiation would fail inside the body. Such a perfect reuse! 🤣

---

<div class="post-metadata">

**Author:** ![kevlar700](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/kevlar700/32/1118_2.png) [@kevlar700](https://forum.ada-lang.io/u/kevlar700)\
**Post date:** [November 29, 2024, 5:16pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/37 "2024-11-29T17:16:40Z")

</div>

One of the most important parts of re-use is not Dry (do not repeat yourself) but readability. I think Generics wins there compared to abstract tagged types, inheritance and interfaces.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 29, 2024, 5:55pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/38 "2024-11-29T17:55:56Z")

</div>

Are you joking?

- Readability is a part of re-use only when you do _cut-and-paste_. Which is pretty close to the nature of macro expansions.
- Generics when used at production scale are totally unreadable. Error messages that nobody can understand. Most of GNAT bugs were related to generics. GPS fails to navigate generic code. Debugger does not work anyway. And Generics are fundamentally non-testable.

If the leading compiler vendor cannot understand the mess what can be said about us, lame programmers…

I do not want to offend anybody, but it seems that nobody who argued for generics ever used them massively. I did. I can present a lot of very complicated generic code. Even more code I cannot show, because it is proprietary. That thing is especially nasty as I tried to use generics to enforce static type checks. It was a success, but it led to a monstrous code, which GNAT could not compile for a quite long time. Even longer it could compile, but ran out of memory. I needed 2GB per compiler task. It was fun to tune -g switch settings for half a dozen targets, we had. No need to say that it could not compile natively on an ARM 32-bit. It still cannot. We have to buy a cross compiler from AdaCore to work it around.

Since then I am actively preaching against generics.

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [November 29, 2024, 6:33pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/39 "2024-11-29T18:33:04Z")

</div>

> [@dmitry-kazakov](#):
>
> So far GNAT cannot even guarantee that little as when generic body compiles then no instantiation would fail inside the body.

Eh, but GNAT is not Ada.  
Neither is AdaCore Ada.

That you are so quick to point to GNAT is indicative that we-the-community need another free/open implementation.

> [@kevlar700](#):
>
> One of the most important parts of re-use is not Dry (do not repeat yourself) but readability. I think Generics wins there compared to abstract tagged types, inheritance and interfaces.

I generally agree; generics are VERY good (and arguably under-used).  
The static polymorphism and ability to decompose some subsystem in particular.

> [@dmitry-kazakov](#):
>
> - Readability is a part of re-use only when you do _cut-and-paste_. Which is pretty close to the nature of macro expansions.

Not necessarily; readability _also_ comes from good structuring.  
As an example, in [this implementation](https://github.com/OneWingedShark/Risi/blob/894edaa3805de4ad49b08360a127280ff5109516/src/risi_script-types-implementation-convert.adb) of type-conversions for a toy language/VM Generics and overloading are used to reduce the MxM combinatorial explosion to a linear one.

> [@dmitry-kazakov](#):
>
> Generics when used at production scale are totally unreadable. Error messages that nobody can understand. Most of GNAT bugs were related to generics. GPS fails to navigate generic code. Debugger does not work anyway. And Generics are fundamentally non-testable.

That’s pretty odd — I don’t think I’ve ever had an unreadable error-message dealing with generics, though perhaps I simply don’t remember.  
But, again, a lot of this looks like GNAT-isms.

> [@dmitry-kazakov](#):
>
> I do not want to offend anybody, but it seems that nobody who argued for generics ever used them massively. I did. I can present a lot of very complicated generic code.

That’s fine, interesting even.  
I’m wondering, would it be possible to get some good [particularly bad] examples, say as part of a test-suite?

> [@dmitry-kazakov](#):
>
> That thing is especially nasty as I tried to use generics to enforce static type checks. It was a success, but it led to a monstrous code, which GNAT could not compile for a quite long time.

Several things to note:

1. GNAT is not _great_ with static-checks, certain defaults for the compiler indicate this mindset.
2. Your example indicates some languishing in GNAT’s generic implementation.
3. Some SPARK limitations indicate an unwillingness to invest much into generics; particularly that there is no SPARK verification on the generic-proper, even though doing so would allow for much faster proof WRT code that uses generics **and** if you could prove a generic itself then, just like Ada’s generic-instantiation, you could be assured that all [valid] instantiations are correct.

> [@dmitry-kazakov](#):
>
> Even longer it could compile, but ran out of memory. I needed 2GB per compiler task. It was fun to tune -g switch settings for half a dozen targets, we had. No need to say that it could not compile natively on an ARM 32-bit. It still cannot. We have to buy a cross compiler from AdaCore to work it around.

This sounds very much like a product of GNAT’s implementation.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [November 29, 2024, 8:17pm UTC](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791/40 "2024-11-29T20:17:32Z")

</div>

> [@OneWingedShark](#):
>
> I’m wondering, would it be possible to get some good [particularly bad] examples, say as part of a test-suite?

You can see a medium-complex generic code with lots of generic inheritance here:

> **[Intuitionistic fuzzy sets, logic, numbers, lingustic variables](http://www.dmitry-kazakov.de/ada/fuzzy.htm#fuzzy_numbers)**
>
> Fuzzy sets for Ada

Differently to tagged types there are at least three ways of inheritance with generics:

- Instantiation inside the package specification
- Formal generic package
- Generic child

All of them have their disadvantages. E.g. instantiation requires to be a tree and does not provide library level instance package. You immediately run into diamond inheritance problem if the graph is a DAG, which is always the case.

The packages mesh starts with usual formal base types like number, index etc and then rapidly escalates into a total mess as it must produce a dozen of interconnected pckages like intervals, numbers, sets, dimensioned intervals etc.

> [@OneWingedShark](#):
>
> GNAT is not _great_ with static-checks

The idea was to have a generic universe of packages for each of 20 or so datatypes. So elementary operations like Get. Set, Send, Request were statically typed. There were jailbreak primitive operations on top to break out of generics when you need to log, trace, network etc. But the result was that each middleware driver must instantiate a huge number of generics for each data type it supported. While the tagged core was very simple. Inherit from, say, a full-duplex driver, override a dozen primitive operations, you are done. The contrast is staggering.

> [@OneWingedShark](#):
>
> Some SPARK limitations indicate an unwillingness

It is a real-time middleware, lots and lots of tasking, protected objects, loadable plugins, so no SPARK,

> [@OneWingedShark](#):
>
> This sounds very much like a product of GNAT’s implementation.

I doubt any other vendor could do better.

[Previous page](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791.md?page=1)

[Next page](https://forum.ada-lang.io/t/how-to-inherit-string-handling/791.md?page=3)
