comp.lang.ada
 help / color / mirror / Atom feed
* Ada 9X _has_ "class"
@ 1993-03-18 17:34 Magnus Kempe
  0 siblings, 0 replies; 5+ messages in thread
From: Magnus Kempe @ 1993-03-18 17:34 UTC (permalink / raw)


For those concerned with market penetration.

Ada 9X _does_ have classes (conceptually and literally):

	type T_Ref is access T'class; -- note: "class"

	procedure P (X : T'class) is  -- note: "class"
	  Y : T'class := X;           -- note: "class"
	begin
	  ...
	end P;

In addition, Ada 9X clearly distinguishes between types that belong
to classes ("Tag", they're it...) and types that don't.  This is
particularly important for real-time systems.  Some people might
want to avoid any possibility of e.g. hidden run-time type-checking
or dynamic binding.  The real-time community has contributed many
requirements to the language (have you seen the protected types?
the distributed systems annex?).  Ada is not a toy language.

-- 
Magnus Kempe                "No nation was ever drunk when wine was cheap."
magnus@lglsun.epfl.ch                                   -- Thomas Jefferson



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada 9X _has_ "class"
@ 1993-03-19 21:34 John Goodsen
  1993-03-24 16:16 ` Magnus Kempe
  0 siblings, 1 reply; 5+ messages in thread
From: John Goodsen @ 1993-03-19 21:34 UTC (permalink / raw)



In <1993Mar18.181325@lglsun.epfl.ch> magnus@lglsun.epfl.ch 
(Magnus Kempe) writes:

>
>For those concerned with market penetration.
>
>Ada 9X _does_ have classes (conceptually and literally):
>
>	type T_Ref is access T'class; -- note: "class"
>
>	procedure P (X : T'class) is  -- note: "class"
>	  Y : T'class := X;           -- note: "class"
>	begin
>	  ...
>	end P;
>

This doesn't cut it.

The 'CLASS attribute is not what you will see in marketing literature.
What you will see in Marketing literature is "tagged types" :-(
Unless these people are smart to insert the term "class-wide types"
which has been the actual language used when discussing tagged
types by the Ada 9X.  Since this has been the language used by
the Ada 9X committe, why not finish the game and change the syntax
from "type T is tagged..." to "class type T is ...".

Then you won't have to dig into code to figure out that CLASS is part
ofthe language, but you can see it directly from marketing literature.


>
>In addition, Ada 9X clearly distinguishes between types that belong
>to classes ("Tag", they're it...) and types that don't.  This is
>particularly important for real-time systems.  Some people might
>want to avoid any possibility of e.g. hidden run-time type-checking
>or dynamic binding.  
>

The "class type" terminology will also solve this problem also, *AND*
provide pre-defined terminology for the (non-technical) marketing
folks to use.  Don't expect the marketing people to become educators
on what a tagged type really is.  Give them direct ammo by changing
the terminology now while it is still (potentially) an option?

>
>The real-time community has contributed many
>requirements to the language (have you seen the protected types?
>the distributed systems annex?).  

Yes.  It's very nice.


>
>Ada is not a toy language.
>

No one in this thread is implying that.  Do you want your "Beta"
format language to go out and compete against the "VHS" world
of OO programming languages?  I for one am willing to learn from
past marketing mistakes and not repeat them.  

I'm still waiting for a serious argument on why "tagged type"
is better than "class type".  This is why Mr. Ichbiah left.
I just read the rationale and don't agree with it.  Possibly
you could post that little blurb on the "class type" proposal
and rationale for not implement it, Tucker, and let people 
following this thread have a peek?


-- 
John Goodsen                EVB Software Engineering, Inc.
jgg@evb.com                    - Ada & Object Oriented Training/Products
(301) 695-6960                 - Ada GUI & Graphics Tools and Training
                               - Software Reuse, Process & Environments



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada 9X _has_ "class"
  1993-03-19 21:34 Ada 9X _has_ "class" John Goodsen
@ 1993-03-24 16:16 ` Magnus Kempe
  1993-03-25 10:27   ` Christophe Bruniau
  0 siblings, 1 reply; 5+ messages in thread
From: Magnus Kempe @ 1993-03-24 16:16 UTC (permalink / raw)


jgg@evb.com (John Goodsen) quotes a lot and writes:
: 
: The 'CLASS attribute is not what you will see in marketing literature.
: What you will see in Marketing literature is "tagged types".

I have seen a lot of marketing literature touting "inheritance" and
"polymorphism", although the programming languages involved did not have
such keywords.  In addition, I have never seen any ad revolving around
"int" for C, "VAR" for Pascal, or "!" for PROLOG.

If you have a specific, reasoned proposal for a valid syntax change in
Ada 9X, by all means write it.  But please, don't resort to fallacious
arguments.  Marketing droids should know better than throwing keywords
around in order to promote Ada (and any other programming language),
shouldn't they?

The primary goal w.r.t. Ada's syntax is to have a readable and
understandable language.  It has been explained several times that Ada
9X provides both specific types and classes (a set of related types).
These constructs are _so_ different that they should each be subsumed
by a specific concept, and these concepts should not be randomly
mixed.

Since a specific type is _not_ a class, it is quite reasonable to _not_
call it a "class".  If you think the distinction does not matter, or is
"merely technical", think twice.  A tagged type T is _not_ a class: it
is _in_ a class (T'class) as well as in the superclasses of T'class
(e.g. T_First'class).

-- 
Magnus Kempe                "No nation was ever drunk when wine was cheap."
magnus@lglsun.epfl.ch                                   -- Thomas Jefferson



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada 9X _has_ "class"
  1993-03-24 16:16 ` Magnus Kempe
@ 1993-03-25 10:27   ` Christophe Bruniau
  1993-03-29  7:11     ` Magnus Kempe
  0 siblings, 1 reply; 5+ messages in thread
From: Christophe Bruniau @ 1993-03-25 10:27 UTC (permalink / raw)



In article <1993Mar24.164424@lglsun.epfl.ch>, magnus@lglsun.epfl.ch (Magnus Kempe) writes:
|> jgg@evb.com (John Goodsen) quotes a lot and writes:
|> : 
|> : The 'CLASS attribute is not what you will see in marketing literature.
|> : What you will see in Marketing literature is "tagged types".
|> 
|> I have seen a lot of marketing literature touting "inheritance" and
|> "polymorphism", although the programming languages involved did not have
|> such keywords.  In addition, I have never seen any ad revolving around
|> "int" for C, "VAR" for Pascal, or "!" for PROLOG.
|> 
...
|> The primary goal w.r.t. Ada's syntax is to have a readable and
|> understandable language.  It has been explained several times that Ada
|> 9X provides both specific types and classes (a set of related types).
|> These constructs are _so_ different that they should each be subsumed
|> by a specific concept, and these concepts should not be randomly
|> mixed.
|> 
|> Since a specific type is _not_ a class, it is quite reasonable to _not_
|> call it a "class".  If you think the distinction does not matter, or is
|> "merely technical", think twice.  A tagged type T is _not_ a class: it
|> is _in_ a class (T'class) as well as in the superclasses of T'class
|> (e.g. T_First'class).
|> 

If find this quite amazing (if not disturbing).
What does an instance of a class look like ?

It seems to me that, in order to agree with the object paradigm,
 a class instance should be an object. I don't think this is true in
 that case, if a class is some kind of a type set.


|> -- 
|> Magnus Kempe                "No nation was ever drunk when wine was cheap."
|> magnus@lglsun.epfl.ch                                   -- Thomas Jefferson

Christophe BRUNIAU   bruniau@cenatls.cena.dgac.fr




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada 9X _has_ "class"
  1993-03-25 10:27   ` Christophe Bruniau
@ 1993-03-29  7:11     ` Magnus Kempe
  0 siblings, 0 replies; 5+ messages in thread
From: Magnus Kempe @ 1993-03-29  7:11 UTC (permalink / raw)


In article <1993Mar25.102730.10202@cenatls.cena.dgac.fr>, bruniau@cenatls.cena.dgac.fr (Christophe Bruniau) writes:
: 
: What does an instance of a class look like ?

Given a tagged type T and two derived types T1 and T2, you get the
following:  T1'class and T2'class are subclasses of T'class.
Any object belonging to the specific type T1 is thus an instance of
T1'class and of T'class.  Same for T2, mutatis mutandis.  Any object
belonging to the specific type T is an instance of T'class (but not of
T1'class, of course). Thus:
	X : T;  -- instance of T'class
	Y : T1; -- instance of T1'class and T'class
	Z : T2; -- instance of T2'class and T'class

In Ada 9X, to "be an instance of class such-and-such" is a property of
all objects belonging to the types in that class.  Most of the time you
want to program with specific types, and sometimes you want to use class-
wide programming techniques.  Ada 9x gives you both, with strong typing.

-- 
Magnus Kempe                "No nation was ever drunk when wine was cheap."
magnus@lglsun.epfl.ch                                   -- Thomas Jefferson



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1993-03-29  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-03-19 21:34 Ada 9X _has_ "class" John Goodsen
1993-03-24 16:16 ` Magnus Kempe
1993-03-25 10:27   ` Christophe Bruniau
1993-03-29  7:11     ` Magnus Kempe
  -- strict thread matches above, loose matches on Subject: below --
1993-03-18 17:34 Magnus Kempe

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