comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: Aspect location in expression function.
Date: Wed, 25 May 2022 20:45:58 +0200	[thread overview]
Message-ID: <t6lth7$6qd$1@dont-email.me> (raw)
In-Reply-To: <t6kebj$npp$1@dont-email.me>

On 25.05.22 07:20, Randy Brukardt wrote:
> "G.B." <bauhaus@notmyhomepage.invalid> wrote in message
> news:t6j7se$8b1$1@dont-email.me...
>> On 24.05.22 06:05, Randy Brukardt wrote:
> ...
>> Who cares to see "is abstract" if P is in a spec?
>> The implementer, I guess, but the client? Less so.
> 
> Any client that needs to declare an extension (pretty common in OOP),

Another, dare I say, more frequent way of being a client of a type
is being a caller of the type's subprograms, such as P, rather than
being an implementer of a type's concrete behavior. (The two can
overlap, but I'm thinking of the more frequent human clients here :) )

A case I'd single out is a type that comes with a factory F.
I'd expect the associated type T to be abstract. This goes
without saying! ;-) A client needs to know the "behavioral"
interface of T and also that of F.
   The "is abstract" then remains as helpful language technology,
but as seen inside the factory.

(So, I'd put "is abstract" last.)

> especially as "abstract" routines mostly are used with root types (and
> interfaces). I suppose you could "program by error" 

Not design errors, but mechanical errors duly output by the compiler.
The programmer will be programming by "following the language's rules".
IDEs and compilers will assist the programmer who is implementing
an abstract type. For example, the usual IDE has this suggestion
following its compiler's error message::

   Fix: "Add unimplemented methods"
(for)
   Error: "The type must implement[!] the inherited abstract method ..."

The IDE will do so if you answer "Yes" and programmers can provide their
own adjustments to template text that this mechanism will be using. Thus,
again, programmers can involve useful language technology in
a template's text. I remember some Ada tools offering similar features.

      reply	other threads:[~2022-05-25 18:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14 11:47 Aspect location in expression function Blady
2022-05-14 15:40 ` J-P. Rosen
2022-05-24  4:05   ` Randy Brukardt
2022-05-24 10:01     ` J-P. Rosen
2022-05-25  5:17       ` Randy Brukardt
2022-05-24 18:24     ` G.B.
2022-05-25  5:20       ` Randy Brukardt
2022-05-25 18:45         ` G.B. [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox