Re: The A-Z of Programming Languages: Ada, interview with S. TuckerTaft

This is a discussion on Re: The A-Z of Programming Languages: Ada, interview with S. TuckerTaft within the Eiffel forums in Programming Languages category; Jean-Pierre Rosen wrote: > Georg Bauhaus a écrit : >> IIUC what Taft says in the interview, Ichbiah didn't like the >> _way_ OOP was to be implemented. OTOH he had been working on a >> Simula compiler at INRIA. So maybe OOP alone was not the elephant. >> > Certainly. Actually, Ichbiah was well aware of the benefits of OOP, and > actually that's why he insisted for having derived types in Ada83, > against the opinion of the rest of his team. Thanks. As promised, here is what Meyer quotes from Ichbiah's resignation letter: "A massive increase in ...

Go Back   Application Development Forum > Programming Languages > Eiffel

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 06-05-2008, 03:40 PM
Georg Bauhaus
Guest
 
Default Re: The A-Z of Programming Languages: Ada, interview with S. TuckerTaft

Jean-Pierre Rosen wrote:
> Georg Bauhaus a écrit :
>> IIUC what Taft says in the interview, Ichbiah didn't like the
>> _way_ OOP was to be implemented. OTOH he had been working on a
>> Simula compiler at INRIA. So maybe OOP alone was not the elephant.
>>

> Certainly. Actually, Ichbiah was well aware of the benefits of OOP, and
> actually that's why he insisted for having derived types in Ada83,
> against the opinion of the rest of his team.


Thanks.
As promised, here is what Meyer quotes from Ichbiah's resignation
letter:

"A massive increase in complexity will result from 9X adding one or more
additional possibilities where Ada now offers two. For example, 9X adds:
[...] access parameters, to IN, OUT, and IN OUT; tagged types, to normal
types; dispatched subprogram calls, to normal subprogram calls; use type
clause, to use package clauses; ... With 9X, the number of interactions
to consider is close to 60,000 since we have 3 or more possibilities in
each case (that is, 3^10)." (OOSC2, §33.7, p.1095)

The comment "adds: tagged types, to normal types" is particularly
interesting, I think, because it touches on a consequence of
this distinction: sloppy versus exact base type systems:

Eiffel tries to have basically one kind of type definition,
namely the class---even though "expanded class" "adds one or more
additional possibilities", if I may aim Ichbiah's comment at
Eiffel. Compiler magic is/was used for types such as INTEGER or REAL.
Some operations of INTEGER are "require"-predicates used for testing
whether or not an integer value fits a subsets of INTEGER,
e.g. 8-bit integers.

Ada, as mentioned by Ichbiah, has "normal" types for defining
integers, reals, etc., and tagged types for defining polymorphic types.
You want integers between 0 and 10_000 only? Define a corresponding
normal type, or do "normal" derivation from another integer type
adding the needed constraint.
(Part of the language since Ada 83 as pointed out by J.-P. Rosen above.)

What I find so interesting is that these ways to define basic types
might show that there are undeniable reasons to require two type
definition mechanisms. (I guess this is not news to people who worked
on either Ada 9X or Eiffel, but it appears to be news to a new audience
tackling the base type system. And the presence of one or the other
always affects programs.)

Do the Eiffel base types work well? Do they match the "normal"
integer types of Ada in practice? Using cut&paste polymorphism
and renaming one can change INTEGER to a different INTEGER with more
specific require predicates, predicates even more powerful than Ada's
range constraints(*). Still, people coming to Eiffel have more than
once asked for more programmer control of basic Eiffel types such as
INTEGER and FLOAT. Messing with base types, renaming and cluster
management do not look like the best solution.

So maybe there is good reason to have both normal types, and tagged
types, even if this complicates the language?

_____
(*) Some hard work has been done with the goal of enhancing
Ada's type constraints in the sense of DbC. It has been published
as AIs and elsewhere.

X'Post
-- Georg Bauhaus
Reply With Quote
  #2  
Old 06-05-2008, 04:46 PM
Dmitry A. Kazakov
Guest
 
Default Re: The A-Z of Programming Languages: Ada, interview with S. Tucker Taft

On Thu, 05 Jun 2008 21:40:55 +0200, Georg Bauhaus wrote:

> "A massive increase in complexity will result from 9X adding one or more
> additional possibilities where Ada now offers two. For example, 9X adds:
> [...] access parameters, to IN, OUT, and IN OUT; tagged types, to normal
> types; dispatched subprogram calls, to normal subprogram calls; use type
> clause, to use package clauses; ... With 9X, the number of interactions
> to consider is close to 60,000 since we have 3 or more possibilities in
> each case (that is, 3^10)." (OOSC2, §33.7, p.1095)


I cannot decode this, so let it be...

> The comment "adds: tagged types, to normal types" is particularly
> interesting, I think, because it touches on a consequence of
> this distinction: sloppy versus exact base type systems:


In which sense "sloppy/exact"?

> Ada, as mentioned by Ichbiah, has "normal" types for defining
> integers, reals, etc., and tagged types for defining polymorphic types.


Tagged types aren't polymorphic. Only their classes (closures of) are.

> You want integers between 0 and 10_000 only? Define a corresponding
> normal type, or do "normal" derivation from another integer type
> adding the needed constraint.
> (Part of the language since Ada 83 as pointed out by J.-P. Rosen above.)


Well, I understand this complain. Actually, there is no semantic difference
between:

subtype S is T ...; -- "Normal" derivation

and

type S is new T with ...; -- "Abnormal" derivation

and with Ada 2005

type S is interface and T; -- "Horrific" derivation

Clearly, all of them should have same syntax. Clearly interfaces are
superfluous when abstract types could do anything they do and more.
Further, interfaces are damaging to software design. One is forced
permanently factor out interfaces out of types instead of trivial interface
inheritance from concrete types.

> What I find so interesting is that these ways to define basic types
> might show that there are undeniable reasons to require two type
> definition mechanisms.


Really? I'd like to deny some of them. (:-))

> So maybe there is good reason to have both normal types, and tagged
> types, even if this complicates the language?


No, there is no substantial difference between two mechanisms, once one has
separated polymorphic (class) and specific (type) as Ada 95 did, all types
become "normal." Abnormal are classes, which you aren't forced to use as
they are completely orthogonal to "normal" types.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 06:48 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.