comp.lang.ada
 help / color / mirror / Atom feed
* Abstract methods in ADA95
@ 2002-10-17 13:36 Hector Hugo
  2002-10-17 14:39 ` Lutz Donnerhacke
                   ` (4 more replies)
  0 siblings, 5 replies; 39+ messages in thread
From: Hector Hugo @ 2002-10-17 13:36 UTC (permalink / raw)



Hello, i'm new programing in Ada95, i come from C++ world and i've got problems 
when i try to use abstract methods in Ada95. I'm trying to do something similar 
to this but in Ada95:

class Abstract_Class
{
public:
   virtual void Abstract_Method () = 0;  // C++ abstract method.
 
   ...
};

class Son_Class: public Abstract_Class   // C++ tagged type extension.
{
   void Abstract_Method ();

   ...
};

void main ()
{
   Abstract_Class* p_abstract = new Son_Class;

   p_abstract->Abstract_Method ();
}

Can anyone help me?

Thank you.

-- 
Use our news server 'news.foorum.com' from anywhere.
More details at: http://nnrpinfo.go.foorum.com/



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

* Re: Abstract methods in ADA95
  2002-10-17 13:36 Abstract methods in ADA95 Hector Hugo
@ 2002-10-17 14:39 ` Lutz Donnerhacke
  2002-10-17 14:50 ` David C. Hoos
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 39+ messages in thread
From: Lutz Donnerhacke @ 2002-10-17 14:39 UTC (permalink / raw)


* Hector Hugo wrote:
> Hello, i'm new programing in Ada95, i come from C++ world and i've got
> problems when i try to use abstract methods in Ada95. I'm trying to do
> something similar to this but in Ada95:
> 
> class Abstract_Class
> {
> public:
>    virtual void Abstract_Method () = 0;  // C++ abstract method.
>  
>    ...
> };

  type Abstract_Class is abstract tagged record ...;
  procedure Abstract_Method (a : Abstract_Class) is abstact;

> class Son_Class: public Abstract_Class   // C++ tagged type extension.
> {
>    void Abstract_Method ();
> 
>    ...
> };

  type Son_Class is new Abstract_Class with record ...;
  procedure Abstract_Method (a : Son_Class);

> void main ()
> {
>    Abstract_Class* p_abstract = new Son_Class;
> 
>    p_abstract->Abstract_Method ();
> }

  procedure main is
     concrete : Abstract_Class'Class := Son_Class'(null record);
  begin
     Abstract_Method(concrete);
  end main;



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

* Re: Abstract methods in ADA95
  2002-10-17 13:36 Abstract methods in ADA95 Hector Hugo
  2002-10-17 14:39 ` Lutz Donnerhacke
@ 2002-10-17 14:50 ` David C. Hoos
  2002-10-17 14:57   ` Preben Randhol
  2002-10-17 14:56 ` Preben Randhol
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 39+ messages in thread
From: David C. Hoos @ 2002-10-17 14:50 UTC (permalink / raw)


On my FTP site you will find a toy application that
illustrates the use of abstract types and subprograms,
as well as some of the other object-oriented Ada
features.

The file is at ftp.ada95.com/pub/pet_store.tgz

----- Original Message -----
From: "Hector Hugo" <hmijares@indra.es>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Thursday, October 17, 2002 8:36 AM
Subject: Abstract methods in ADA95

<snip>





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

* Re: Abstract methods in ADA95
  2002-10-17 13:36 Abstract methods in ADA95 Hector Hugo
  2002-10-17 14:39 ` Lutz Donnerhacke
  2002-10-17 14:50 ` David C. Hoos
@ 2002-10-17 14:56 ` Preben Randhol
  2002-10-17 16:18 ` Matthew Heaney
  2002-10-17 19:26 ` Jeffrey Carter
  4 siblings, 0 replies; 39+ messages in thread
From: Preben Randhol @ 2002-10-17 14:56 UTC (permalink / raw)


Hector Hugo wrote:
> 
> Hello, i'm new programing in Ada95, i come from C++ world and i've got
> problems when i try to use abstract methods in Ada95. I'm trying to do
> something similar to this but in Ada95:

You have already gotten the answer by somebody else, but since you come
from C++ you might want to read http://www.adapower.com/articles/class.html
to understand a bit more how the definition of "class" is in Ada95.

Preben
-- 
This is Ada land. On quiet nights you can hear C programs crash.



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

* Re: Abstract methods in ADA95
  2002-10-17 14:50 ` David C. Hoos
@ 2002-10-17 14:57   ` Preben Randhol
  0 siblings, 0 replies; 39+ messages in thread
From: Preben Randhol @ 2002-10-17 14:57 UTC (permalink / raw)


David C. Hoos wrote:
> The file is at ftp.ada95.com/pub/pet_store.tgz

Since some programs will default to prepend http:// it might be better
to use this URL:

   ftp://ftp.ada95.com/pub/pet_store.tgz

-- 
Ada95 is good for you.
http://libre.act-europe.fr/Software_Matters/02-C_pitfalls.pdf



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

* Re: Abstract methods in ADA95
  2002-10-17 13:36 Abstract methods in ADA95 Hector Hugo
                   ` (2 preceding siblings ...)
  2002-10-17 14:56 ` Preben Randhol
@ 2002-10-17 16:18 ` Matthew Heaney
  2002-10-17 19:26 ` Jeffrey Carter
  4 siblings, 0 replies; 39+ messages in thread
From: Matthew Heaney @ 2002-10-17 16:18 UTC (permalink / raw)



"Hector Hugo" <hmijares@indra.es> wrote in message
news:20021017-143635-828420@foorum.com...
>
> class Abstract_Class
> {
> public:
>    virtual void Abstract_Method () = 0;  // C++ abstract method.
>
>    ...
> };

This class smells funny, because you didn't make the dtor virtual:

class AC
{
public:
   virtual ~AC();
   virtual void am() = 0;
};

If you try to delete an object of your original type, your program is
undefined; at a minimum you'll have a memory leak.

Note the the abstract root type must *always* define the dtor --not just
declare it-- even if the dtor is marked as pure virtual.

Also, you should *always* define the dtor as a non-inline function, so that
the vtables have a home.

Ahhh, isn't C++ fun...


> class Son_Class: public Abstract_Class   // C++ tagged type extension.
> {
>  public:
>    void Abstract_Method ();
>
>    ...
> };
>
> void main ()
> {
>    Abstract_Class* p_abstract = new Son_Class;
>
>    p_abstract->Abstract_Method ();
> }


package P is
   type T is abstract tagged null record;
   procedure Op (O : in out T) is abstract;
end P;

package P.C is
   type NT is new T with null record;
   procedure Op (O : in out NT);
end P.C;

declare
   O : T'Class := NT'(T with null record);
begin
   Op (O);
end;

Alternatively, you can allocate off the heap as you did in your C++ example:

declare
   type T_Class_Access is access all T'Class;
   O : T_CLass_Access := new NT;
begin
   Op (O.all);
end;

Or you could rewrite your C++ example to eliminate the heap:

{
   Son_Class x;
   Abstract_Class* const p = &x;
   p->Abstract_Method();  //dispatches
}

Or you could rewrite the C++ example to eliminate the pointer:

{
   Son_Class x;
   Abstract_Class& y = x;
   y.Abstract_Method();  //dispatches
}

Or you could write the example so that the call is statically bound:

{
   Son_Class x;
   x.Abstract_Method();  //static binding
}







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

* Re: Abstract methods in ADA95
  2002-10-17 13:36 Abstract methods in ADA95 Hector Hugo
                   ` (3 preceding siblings ...)
  2002-10-17 16:18 ` Matthew Heaney
@ 2002-10-17 19:26 ` Jeffrey Carter
  2002-10-17 19:41   ` David C. Hoos
                     ` (3 more replies)
  4 siblings, 4 replies; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-17 19:26 UTC (permalink / raw)


Hector Hugo wrote:
> Hello, i'm new programing in Ada95, i come from C++ world and i've got problems 
> when i try to use abstract methods in Ada95. I'm trying to do something similar 
> to this but in Ada95:

There are no "methods", abstract or otherwise, in Ada. Ada has 
subprograms and entries; subprograms are either procedures or functions. 
Nary a method in sight.

I'm hardly a C++ expert, but IIRC there are also no "methods" in C++. 
C++ has only functions.

-- 
Jeff Carter
"I unclog my nose towards you."
Monty Python & the Holy Grail




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

* Re: Abstract methods in ADA95
  2002-10-17 19:26 ` Jeffrey Carter
@ 2002-10-17 19:41   ` David C. Hoos
  2002-10-17 20:34   ` Georg Bauhaus
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 39+ messages in thread
From: David C. Hoos @ 2002-10-17 19:41 UTC (permalink / raw)



----- Original Message -----
From: "Jeffrey Carter" <jrcarter@acm.org>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Thursday, October 17, 2002 2:26 PM
Subject: Re: Abstract methods in ADA95


> Hector Hugo wrote:
> > Hello, i'm new programing in Ada95, i come from C++ world and i've got
problems
> > when i try to use abstract methods in Ada95. I'm trying to do something
similar
> > to this but in Ada95:
>
> There are no "methods", abstract or otherwise, in Ada. Ada has
> subprograms and entries; subprograms are either procedures or functions.
> Nary a method in sight.
>
> I'm hardly a C++ expert, but IIRC there are also no "methods" in C++.
> C++ has only functions.
In C++, member functions of a class are called "methods."






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

* Re: Abstract methods in ADA95
  2002-10-17 19:26 ` Jeffrey Carter
  2002-10-17 19:41   ` David C. Hoos
@ 2002-10-17 20:34   ` Georg Bauhaus
  2002-10-18 13:56     ` Frank J. Lhota
  2002-10-18  0:40   ` Robert A Duff
  2002-10-18  3:13   ` SteveD
  3 siblings, 1 reply; 39+ messages in thread
From: Georg Bauhaus @ 2002-10-17 20:34 UTC (permalink / raw)


Jeffrey Carter <jrcarter@acm.org> wrote:
: There are no "methods", abstract or otherwise, in Ada. Ada has 
: subprograms and entries; subprograms are either procedures or functions. 
: Nary a method in sight.

Operations?

-- georg



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

* Re: Abstract methods in ADA95
  2002-10-17 19:26 ` Jeffrey Carter
  2002-10-17 19:41   ` David C. Hoos
  2002-10-17 20:34   ` Georg Bauhaus
@ 2002-10-18  0:40   ` Robert A Duff
  2002-10-18 21:05     ` Jeffrey Carter
  2002-10-18  3:13   ` SteveD
  3 siblings, 1 reply; 39+ messages in thread
From: Robert A Duff @ 2002-10-18  0:40 UTC (permalink / raw)


Jeffrey Carter <jrcarter@acm.org> writes:

> There are no "methods", abstract or otherwise, in Ada. Ada has
> subprograms and entries; subprograms are either procedures or
> functions. Nary a method in sight.

Bah.  Why be so pedantic about teriminology?  I'm happy to call
dispatching operations "methods", informally, because that's what
they're called in some other languages.  I'm also happy to talk about
"pointers", although when I was writing the RM I had to call them
"access values".  And if a Fortran programmer asks, "Does Ada have
subroutines", it would be silly to say "No, Ada has no such thing."
And I'm happy to talk about "record fields", even thought the official
term is "record components".

- Bob



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

* Re: Abstract methods in ADA95
  2002-10-17 19:26 ` Jeffrey Carter
                     ` (2 preceding siblings ...)
  2002-10-18  0:40   ` Robert A Duff
@ 2002-10-18  3:13   ` SteveD
  2002-10-18 14:44     ` Robert A Duff
  2002-10-18 21:08     ` Jeffrey Carter
  3 siblings, 2 replies; 39+ messages in thread
From: SteveD @ 2002-10-18  3:13 UTC (permalink / raw)


"Jeffrey Carter" <jrcarter@acm.org> wrote in message
news:3DAF0ECE.7080204@acm.org...
> Hector Hugo wrote:
> > Hello, i'm new programing in Ada95, i come from C++ world and i've got
problems
> > when i try to use abstract methods in Ada95. I'm trying to do something
similar
> > to this but in Ada95:
>
> There are no "methods", abstract or otherwise, in Ada. Ada has
> subprograms and entries; subprograms are either procedures or functions.
> Nary a method in sight.
>
> I'm hardly a C++ expert, but IIRC there are also no "methods" in C++.
> C++ has only functions.
>

Don't confuse abstract terminology with programming language nomenclature.
Both Ada and C++ have "methods".

See: http://www.webopedia.com/TERM/m/method.html

or your favorite reference (this is the first one that showed up on google
for computer dictionary).

SteveD

> --
> Jeff Carter
> "I unclog my nose towards you."
> Monty Python & the Holy Grail
>





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

* Re: Abstract methods in ADA95
  2002-10-17 20:34   ` Georg Bauhaus
@ 2002-10-18 13:56     ` Frank J. Lhota
  0 siblings, 0 replies; 39+ messages in thread
From: Frank J. Lhota @ 2002-10-18 13:56 UTC (permalink / raw)



"Georg Bauhaus" <sb463ba@l1-hrz.uni-duisburg.de> wrote in message
news:aon6s3$l01$1@a1-hrz.uni-duisburg.de...
> Jeffrey Carter <jrcarter@acm.org> wrote:
> : There are no "methods", abstract or otherwise, in Ada. Ada has
> : subprograms and entries; subprograms are either procedures or functions.
> : Nary a method in sight.
>
> Operations?

Operations, either in C++ or in Ada, are simply functions / methods with
unconventional names and calling syntax.





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

* Re: Abstract methods in ADA95
  2002-10-18  3:13   ` SteveD
@ 2002-10-18 14:44     ` Robert A Duff
  2002-10-18 21:15       ` Dale Stanbrough
  2002-10-18 21:08     ` Jeffrey Carter
  1 sibling, 1 reply; 39+ messages in thread
From: Robert A Duff @ 2002-10-18 14:44 UTC (permalink / raw)


"SteveD" <nospam_steved94@attbi.com> writes:

> Don't confuse abstract terminology with programming language nomenclature.
> Both Ada and C++ have "methods".

Maybe when our field is as mature as, say, chemistry, we will have
common terminology.  :-(

- Bob



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

* Re: Abstract methods in ADA95
  2002-10-18  0:40   ` Robert A Duff
@ 2002-10-18 21:05     ` Jeffrey Carter
  2002-10-18 22:00       ` Robert A Duff
  2002-10-21 14:46       ` Wes Groleau
  0 siblings, 2 replies; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-18 21:05 UTC (permalink / raw)


Robert A Duff wrote:
> Bah.  Why be so pedantic about teriminology?

A good question. Would you please explain how zaberqualls in Ada 
figerlib pooterdags?

-- 
Jeff Carter
"Now look, Col. Batguano, if that really is your name."
Dr. Strangelove




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

* Re: Abstract methods in ADA95
  2002-10-18  3:13   ` SteveD
  2002-10-18 14:44     ` Robert A Duff
@ 2002-10-18 21:08     ` Jeffrey Carter
  2002-10-18 21:23       ` David C. Hoos
                         ` (3 more replies)
  1 sibling, 4 replies; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-18 21:08 UTC (permalink / raw)


SteveD wrote:
> Don't confuse abstract terminology with programming language nomenclature.
> Both Ada and C++ have "methods".

There are no "methods", either in abstract terminology or actual 
programming languages. AFAIKS, "method" is a new name for an old concept 
made up to muddy the waters by people who were trying to present old 
concepts as something new that they'd invented.

-- 
Jeff Carter
"Now look, Col. Batguano, if that really is your name."
Dr. Strangelove




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

* Re: Abstract methods in ADA95
  2002-10-18 14:44     ` Robert A Duff
@ 2002-10-18 21:15       ` Dale Stanbrough
  0 siblings, 0 replies; 39+ messages in thread
From: Dale Stanbrough @ 2002-10-18 21:15 UTC (permalink / raw)


Robert A Duff wrote:

> Maybe when our field is as mature as, say, chemistry, we will have
> common terminology.  :-(


Well, at least we have "variable" as a common term. No one would
object to that. Oh... "object". Oh well, never mind.

Dale



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

* Re: Abstract methods in ADA95
  2002-10-18 21:08     ` Jeffrey Carter
@ 2002-10-18 21:23       ` David C. Hoos
  2002-10-18 21:37         ` Jeffrey Carter
  2002-10-18 22:10       ` Robert A Duff
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 39+ messages in thread
From: David C. Hoos @ 2002-10-18 21:23 UTC (permalink / raw)



----- Original Message -----
From: "Jeffrey Carter" <jrcarter@acm.org>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Friday, October 18, 2002 4:08 PM
Subject: Re: Abstract methods in ADA95


> SteveD wrote:
> > Don't confuse abstract terminology with programming language
nomenclature.
> > Both Ada and C++ have "methods".
>
> There are no "methods", either in abstract terminology or actual
> programming languages. AFAIKS, "method" is a new name for an old concept
> made up to muddy the waters by people who were trying to present old
> concepts as something new that they'd invented.

The Smalltalk language defined "methods" from the beginning. So, unless you
don't consider Smalltalk an "actual programming language," your preceding
statement is incorrect.






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

* Re: Abstract methods in ADA95
  2002-10-18 21:23       ` David C. Hoos
@ 2002-10-18 21:37         ` Jeffrey Carter
  2002-10-18 22:08           ` Robert A Duff
  2002-10-21 15:04           ` Wes Groleau
  0 siblings, 2 replies; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-18 21:37 UTC (permalink / raw)


David C. Hoos wrote:
> The Smalltalk language defined "methods" from the beginning. So, unless you
> don't consider Smalltalk an "actual programming language," your preceding
> statement is incorrect.

Smalltalk has subprograms. Subprograms had existed for decades under 
that name before Smalltalk. That Smalltalk uses the meaningless term 
"method" to refer to subprograms doesn't change the fact that they're 
subprograms.

I'm glad to be able to provide some small measure of interest and 
excitement to the readers of cla.

-- 
Jeff Carter
"Now look, Col. Batguano, if that really is your name."
Dr. Strangelove




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

* Re: Abstract methods in ADA95
  2002-10-18 21:05     ` Jeffrey Carter
@ 2002-10-18 22:00       ` Robert A Duff
  2002-10-21 14:46       ` Wes Groleau
  1 sibling, 0 replies; 39+ messages in thread
From: Robert A Duff @ 2002-10-18 22:00 UTC (permalink / raw)


Jeffrey Carter <jrcarter@acm.org> writes:

> Robert A Duff wrote:
> > Bah.  Why be so pedantic about teriminology?
> 
> A good question. Would you please explain how zaberqualls in Ada
> figerlib pooterdags?

Better than the zaberqualls in <some other language>?

Point taken. ;-)

- Bob



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

* Re: Abstract methods in ADA95
  2002-10-18 21:37         ` Jeffrey Carter
@ 2002-10-18 22:08           ` Robert A Duff
  2002-10-21 15:03             ` Peter Amey
  2002-10-21 15:04           ` Wes Groleau
  1 sibling, 1 reply; 39+ messages in thread
From: Robert A Duff @ 2002-10-18 22:08 UTC (permalink / raw)


Jeffrey Carter <jrcarter@acm.org> writes:

> David C. Hoos wrote:
> > The Smalltalk language defined "methods" from the beginning. So, unless you
> > don't consider Smalltalk an "actual programming language," your preceding
> > statement is incorrect.
> 
> Smalltalk has subprograms. Subprograms had existed for decades under
> that name before Smalltalk.

Subprograms?  I thought in those days they were called "subroutines"
or "routines".  Where does the word "subprogram" appear before Ada?

>... That Smalltalk uses the meaningless term
> "method" to refer to subprograms doesn't change the fact that they're
> subprograms.

Bah.  Subprogram, Procedure, method, routine, subroutine, function,
script, etc.
All essentially the same thing.
The only only one I object to is "function", which means something
in maths that is perverted by C and Ada and many others.

> I'm glad to be able to provide some small measure of interest and
> excitement to the readers of cla.

Me, too.  ;-)

- Bob



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

* Re: Abstract methods in ADA95
  2002-10-18 21:08     ` Jeffrey Carter
  2002-10-18 21:23       ` David C. Hoos
@ 2002-10-18 22:10       ` Robert A Duff
  2002-10-19 12:40       ` SteveD
  2002-10-21 14:49       ` Wes Groleau
  3 siblings, 0 replies; 39+ messages in thread
From: Robert A Duff @ 2002-10-18 22:10 UTC (permalink / raw)


Jeffrey Carter <jrcarter@acm.org> writes:

> There are no "methods", either in abstract terminology or actual
> programming languages. AFAIKS, "method" is a new name for an old concept
> made up to muddy the waters by people who were trying to present old
> concepts as something new that they'd invented.

"Message" is the one Smalltalk evilly co-opted, IMHO.
"Method" I can understand.

- Bob



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

* Re: Abstract methods in ADA95
  2002-10-18 21:08     ` Jeffrey Carter
  2002-10-18 21:23       ` David C. Hoos
  2002-10-18 22:10       ` Robert A Duff
@ 2002-10-19 12:40       ` SteveD
  2002-10-19 18:40         ` Jeffrey Carter
                           ` (2 more replies)
  2002-10-21 14:49       ` Wes Groleau
  3 siblings, 3 replies; 39+ messages in thread
From: SteveD @ 2002-10-19 12:40 UTC (permalink / raw)


"Jeffrey Carter" <jrcarter@acm.org> wrote in message
news:3DB0785A.1040304@acm.org...
> SteveD wrote:
> > Don't confuse abstract terminology with programming language
nomenclature.
> > Both Ada and C++ have "methods".
>
> There are no "methods", either in abstract terminology or actual
> programming languages. AFAIKS, "method" is a new name for an old concept
> made up to muddy the waters by people who were trying to present old
> concepts as something new that they'd invented.

Still not convinced?  Try:

http://www.dictionary.com/search?q=method

I don't know what you consider new.  I learned this terminolgy in the early
80's, in computing thats a long time ago (man that makes me feel old).  As
for new names for old concepts... that's exactly how our language works.  It
is dynamic.  For example the term "gay" used in the Flinstones theme has a
completely different meaning than what it has today.

The term "toilet" means something different today than it did to my
grandmother.  When is the last time you heard somone talk about a "Crapper"?
After Thomas Crapper its inventor.

If you loosen up about historic definitions versus current definitions, I
thnk you'll find that "method" is a commonly accepted term.

SteveD

> --
> Jeff Carter
> "Now look, Col. Batguano, if that really is your name."
> Dr. Strangelove
>





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

* Re: Abstract methods in ADA95
  2002-10-19 12:40       ` SteveD
@ 2002-10-19 18:40         ` Jeffrey Carter
  2002-10-21 15:34           ` Martin Dowie
       [not found]         ` <aornkp$mpf$1@bob.news.rcn.net>
  2002-10-21 17:57         ` Abstract methods in ADA95 Programmer Dude
  2 siblings, 1 reply; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-19 18:40 UTC (permalink / raw)


SteveD wrote:
> "Jeffrey Carter" <jrcarter@acm.org> wrote in message
> news:3DB0785A.1040304@acm.org...
> 
>>There are no "methods", either in abstract terminology or actual
>>programming languages. AFAIKS, "method" is a new name for an old concept
>>made up to muddy the waters by people who were trying to present old
>>concepts as something new that they'd invented.
> 
> Still not convinced?  Try:
> 
> http://www.dictionary.com/search?q=method

Four fifths of your references disagree with you.

> 
> I don't know what you consider new.  I learned this terminolgy in the early
> 80's, in computing thats a long time ago (man that makes me feel old).  As
> for new names for old concepts... that's exactly how our language works.  It
> is dynamic.  For example the term "gay" used in the Flinstones theme has a
> completely different meaning than what it has today.

Still not convinced? Try "subprogram" at

http://www.m-w.com/dictionary

It dates from 1947. Coming up with a new word for the same thing more 
than 30 years later counts as new in my book. I first encountered 
subprogram in the 1970s when I learned Pascal.

Yes, the English language is malleable and ambiguous, but in software 
engineering precise and unambiguous are the keys to success. Look at the 
space shuttle software (1 error in 400 KLOC): Precise, unambiguous 
specifications are an important part of their success. To discuss 
technical matters we should not use ambiguous terms.

Inventing new terms for well established, existing ideas adds ambiguity. 
In software engineering, that is irresponsible, if not unethical. Using 
such terms compounds that irresponsibility. I was appalled at "method" 
when I first encountered it in the early 1980s and I continue to refuse 
to use it.

Besides, I never get such long, interesting conversations when I agree 
with people.

-- 
Jeff Carter
"Sheriff murdered, crops burned, stores looted,
people stampeded, and cattle raped."
Blazing Saddles




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

* Crapper (was: Re: Abstract methods in ADA95)
       [not found]         ` <aornkp$mpf$1@bob.news.rcn.net>
@ 2002-10-19 18:54           ` Jeffrey Carter
  0 siblings, 0 replies; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-19 18:54 UTC (permalink / raw)


Frank J. Lhota wrote:
>> When is the last time you heard somone talk about a "Crapper"?
>>After Thomas Crapper its inventor.
> 
> 
> Sorry, the whole Thomas Crapper is a hoax, a result of a humor book "Flushed
> With Pride", a parody of biographies. The author of "Flushed with Pride"
> also wrote a mock biography of the inventor of the bra, "Dr. Titsling" .

There was a Thomas Crapper, and he did manufacture toilets. He may have 
invented improvements to the flushing toilet, but he certainly did not 
invent it. The word "crap" to refer to excrement is much older, though.

Toilets manufactured by Crapper's company had "Crapper" prominently 
written on them. No doubt some users thought that was descriptive, 
rather than the name of the company.

See

http://www.tafkac.org/faq2k/word_260.html

(linked from urbanlegends.com)

and

http://www.snopes2.com/business/names/crapper.htm

-- 
Jeff Carter
"Sheriff murdered, crops burned, stores looted,
people stampeded, and cattle raped."
Blazing Saddles




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

* Re: Abstract methods in ADA95
  2002-10-18 21:05     ` Jeffrey Carter
  2002-10-18 22:00       ` Robert A Duff
@ 2002-10-21 14:46       ` Wes Groleau
  1 sibling, 0 replies; 39+ messages in thread
From: Wes Groleau @ 2002-10-21 14:46 UTC (permalink / raw)



>> Bah.  Why be so pedantic about teriminology?
> 
> A good question. Would you please explain how zaberqualls in Ada 
> figerlib pooterdags?

A bad answer.  There is a big difference between
being liberal in what you accept and being conservative
in what you put out.  Your "question" (if I didn't know
the context) could be interpreted as an attempt to NOT be
understood for the sake of strife.

When someone asks a question about methods, and we understand
them and give them a helpful answer, we have in our small way
promoted world peace.

If we instead scold them for not speaking our language, ....

Of course, it wouldn't hurt to append something like,
" by the way, Ada folks tend to use the terms '....' "




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

* Re: Abstract methods in ADA95
  2002-10-18 21:08     ` Jeffrey Carter
                         ` (2 preceding siblings ...)
  2002-10-19 12:40       ` SteveD
@ 2002-10-21 14:49       ` Wes Groleau
  3 siblings, 0 replies; 39+ messages in thread
From: Wes Groleau @ 2002-10-21 14:49 UTC (permalink / raw)


> There are no "methods", either in abstract terminology or actual 
> programming languages. AFAIKS, "method" is a new name for an old concept 
> made up to muddy the waters by people who were trying to present old 
> concepts as something new that they'd invented.

I don't know whether ("made up to muddy the waters") is true or not.
It does seem that way, doesn't it.  But I don't know their motives,
so I'll give them the benefit of the doubt.  As long as they seem
to be engaged in honest dicussion and not merely trying to start a fight.....

-- 
Merrily we Troll Along...
http://freepages.humor.rootsweb.com/~wgroleau




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

* Re: Abstract methods in ADA95
  2002-10-18 22:08           ` Robert A Duff
@ 2002-10-21 15:03             ` Peter Amey
  0 siblings, 0 replies; 39+ messages in thread
From: Peter Amey @ 2002-10-21 15:03 UTC (permalink / raw)


[snip]
> Bah.  Subprogram, Procedure, method, routine, subroutine, function,
> script, etc.
> All essentially the same thing.
> The only only one I object to is "function", which means something
> in maths that is perverted by C and Ada and many others.
> 
but not, of course, in SPARK where a function really is a function ;-)

Peter



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

* Re: Abstract methods in ADA95
  2002-10-18 21:37         ` Jeffrey Carter
  2002-10-18 22:08           ` Robert A Duff
@ 2002-10-21 15:04           ` Wes Groleau
  1 sibling, 0 replies; 39+ messages in thread
From: Wes Groleau @ 2002-10-21 15:04 UTC (permalink / raw)


> Smalltalk has subprograms. Subprograms had existed for decades under 
> that name before Smalltalk. That Smalltalk uses the meaningless term 
> "method" to refer to subprograms doesn't change the fact that they're 
> subprograms.

They are not subprograms.  They are entities that a large
group of English speakers have agreed to identify by the
term "subprograms."

"Words don't have meanings.  People have meanings
which they express with words."  -- Maldonado

"The map is not the territory."  -- McLuhan




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

* Re: Abstract methods in ADA95
  2002-10-19 18:40         ` Jeffrey Carter
@ 2002-10-21 15:34           ` Martin Dowie
  2002-10-21 19:37             ` Jeffrey Carter
  2002-10-22 12:24             ` Marin David Condic
  0 siblings, 2 replies; 39+ messages in thread
From: Martin Dowie @ 2002-10-21 15:34 UTC (permalink / raw)


"Jeffrey Carter" <jrcarter@acm.org> wrote in message
news:3DB1A736.7000506@acm.org...
> Inventing new terms for well established, existing ideas adds ambiguity.
> In software engineering, that is irresponsible, if not unethical. Using
> such terms compounds that irresponsibility. I was appalled at "method"
> when I first encountered it in the early 1980s and I continue to refuse
> to use it.

Just wondering how you feel about "methodology" - when I were a lad this
meant 'the study of methods' and I'm still willing to get on a hobby-horse
about it! :-)





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

* Re: Abstract methods in ADA95
  2002-10-19 12:40       ` SteveD
  2002-10-19 18:40         ` Jeffrey Carter
       [not found]         ` <aornkp$mpf$1@bob.news.rcn.net>
@ 2002-10-21 17:57         ` Programmer Dude
  2002-10-21 18:58           ` Jim Rogers
  2 siblings, 1 reply; 39+ messages in thread
From: Programmer Dude @ 2002-10-21 17:57 UTC (permalink / raw)


SteveD wrote:

> When is the last time you heard somone talk about a "Crapper"?

Quite recently.  I use it all the time.  ;-)

On topic.... To be honest, I dislike the term "subprogram" to mean
a *piece* of a complete program.  To me "program" implies a sense of
completeness I don't find in a sub-routine/function/method/whatever.
As an Ada nuub, I'm still in the mental translation "subprogram" ==
"function" phase, and it's ever so slightly jarring.

(Back off topic....In the language I designed I called'm "Actors".
They perform Actions. :-)

-- 
|_ CJSonnack <Chris@Sonnack.com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL  |
|_____________________________________________|_______________________|



Opinions expressed herein are my own and may not represent those of my employer.




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

* Re: Abstract methods in ADA95
  2002-10-21 17:57         ` Abstract methods in ADA95 Programmer Dude
@ 2002-10-21 18:58           ` Jim Rogers
  0 siblings, 0 replies; 39+ messages in thread
From: Jim Rogers @ 2002-10-21 18:58 UTC (permalink / raw)


Programmer Dude wrote:

> SteveD wrote:
> 
> 
>>When is the last time you heard somone talk about a "Crapper"?
>>
> 
> Quite recently.  I use it all the time.  ;-)
> 
> On topic.... To be honest, I dislike the term "subprogram" to mean
> a *piece* of a complete program.  To me "program" implies a sense of
> completeness I don't find in a sub-routine/function/method/whatever.
> As an Ada nuub, I'm still in the mental translation "subprogram" ==
> "function" phase, and it's ever so slightly jarring.
> 
> (Back off topic....In the language I designed I called'm "Actors".
> They perform Actions. :-)
> 
> 

In the Ada sense they are called subprograms because procedures and
functions are different in Ada. This also distinguishes the set of
procedures and functions from tasks.

The sets of "actors" in Ada can be grouped in interesting ways.

subprograms - the set of non-protected procedures and functions
protected operations - the set of protected functions, protected procedures,
                        and protected entries
tasks

Grouping all these "actors" under a single set such as methods, subroutines,
or subprograms is not useful. Each grouping has its own set of interface
and usage rules.

Subprograms can be called by other subprograms, tasks, and protected operations.
Tasks can only be "called" through their entries.
Protected operations only work on protected objects and always imply mutual
exclusion locking.

If you get very general and try to group all these entities together you will
obscure the very real differences. I do not think such obscurity is useful.

Jim Rogers




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

* Re: Abstract methods in ADA95
  2002-10-21 15:34           ` Martin Dowie
@ 2002-10-21 19:37             ` Jeffrey Carter
  2002-10-22 11:59               ` Georg Bauhaus
  2002-10-22 12:24             ` Marin David Condic
  1 sibling, 1 reply; 39+ messages in thread
From: Jeffrey Carter @ 2002-10-21 19:37 UTC (permalink / raw)


Martin Dowie wrote:
> Just wondering how you feel about "methodology" - when I were a lad this
> meant 'the study of methods' and I'm still willing to get on a hobby-horse
> about it! :-)

Ah, yes, the study of subprograms :) Don't get me started on this one.

-- 
Jeff Carter
"The time has come to act, and act fast. I'm leaving."
Blazing Saddles




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

* Re: Abstract methods in ADA95
  2002-10-21 19:37             ` Jeffrey Carter
@ 2002-10-22 11:59               ` Georg Bauhaus
  0 siblings, 0 replies; 39+ messages in thread
From: Georg Bauhaus @ 2002-10-22 11:59 UTC (permalink / raw)


Jeffrey Carter <jrcarter@acm.org> wrote:
:> Just wondering how you feel about "methodology" - when I were a lad this
:> meant 'the study of methods' and I'm still willing to get on a hobby-horse
:> about it! :-)
: 
: Ah, yes, the study of subprograms :) Don't get me started on this one.

That would be subprographology, no? SCNR.
--georg



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

* Re: Abstract methods in ADA95
  2002-10-21 15:34           ` Martin Dowie
  2002-10-21 19:37             ` Jeffrey Carter
@ 2002-10-22 12:24             ` Marin David Condic
  2002-10-23  9:29               ` Martin Dowie
  1 sibling, 1 reply; 39+ messages in thread
From: Marin David Condic @ 2002-10-22 12:24 UTC (permalink / raw)


Yea Verrily! I am always irritated by the frequent misuse of that term and
would like to see it properly understood. There is no "OO Methodology" in
the way people normally use the term. There is the "OO Method" - which might
have been brought about by methodology.

MDC
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jast.mil/

Send Replies To: m c o n d i c @ a c m . o r g

    "I'd trade it all for just a little more"
        --  Charles Montgomery Burns, [4F10]
======================================================================

Martin Dowie <martin.dowie@no-sp-am.btopenworld.com> wrote in message
news:ap16pf$gvg$1@knossos.btinternet.com...
>
> Just wondering how you feel about "methodology" - when I were a lad this
> meant 'the study of methods' and I'm still willing to get on a hobby-horse
> about it! :-)
>
>





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

* Re: Abstract methods in ADA95
  2002-10-22 12:24             ` Marin David Condic
@ 2002-10-23  9:29               ` Martin Dowie
  2002-10-23 10:36                 ` Ed Falis
                                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Martin Dowie @ 2002-10-23  9:29 UTC (permalink / raw)


"Marin David Condic" <mcondic.auntie.spam@acm.org> wrote in message
news:ap3g57$2d6$1@slb4.atl.mindspring.net...
> Yea Verrily! I am always irritated by the frequent misuse of that term and
> would like to see it properly understood. There is no "OO Methodology" in
> the way people normally use the term. There is the "OO Method" - which
might
> have been brought about by methodology.

And don't get me started on "Oriented"!! It should be "Orientated" unless
perhaps you're developing in, for example, China. ;-)





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

* Re: Abstract methods in ADA95
  2002-10-23  9:29               ` Martin Dowie
@ 2002-10-23 10:36                 ` Ed Falis
  2002-10-23 10:37                 ` Preben Randhol
  2002-10-23 12:54                 ` John English
  2 siblings, 0 replies; 39+ messages in thread
From: Ed Falis @ 2002-10-23 10:36 UTC (permalink / raw)


Martin Dowie wrote:
> And don't get me started on "Oriented"!! It should be "Orientated" unless
> perhaps you're developing in, for example, China. ;-)
> 
> 

Huh?

"falis@garuda:~$ dict oriented
2 definitions found

 From The Collaborative International Dictionary of English v.0.44 [gcide]:

   orientated \orientated\ oriented \oriented\adj.
      1. Adjusted or aligned to surroundings or circumstances;
         sometimes used in combination; as, to get oriented on
         one's first day at a new job.
         [WordNet 1.5]

      2. headed or intending to head in a certain direction; as,
         college-oriented students. Opposite of {unoriented}.

      Syn: directed, minded.
           [WordNet 1.5]

 From WordNet (r) 1.7.1 (July 2002) [wn]:

   oriented
        adj : adjusted or located in relation to surroundings or
              circumstances; sometimes used in combination; "the
              house had its large windows oriented toward the ocean
              view"; "helping freshmen become oriented to college
              life"; "the book is value-oriented throughout" [syn: 
{orientated}]
              [ant: {unoriented}]






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

* Re: Abstract methods in ADA95
  2002-10-23  9:29               ` Martin Dowie
  2002-10-23 10:36                 ` Ed Falis
@ 2002-10-23 10:37                 ` Preben Randhol
  2002-10-23 12:54                 ` John English
  2 siblings, 0 replies; 39+ messages in thread
From: Preben Randhol @ 2002-10-23 10:37 UTC (permalink / raw)


Martin Dowie wrote:
> 
> And don't get me started on "Oriented"!! It should be "Orientated" unless
> perhaps you're developing in, for example, China. ;-)

Then I think Chinese would be used and not English ;-)

Preben
-- 
Preben Randhol  --------------------  http://www.pvv.org/~randhol
�.., chaos is found in greatest abundance wherever order is being
sought. It always defeats order, because it is better organized.�
                            -- Interesting Times, Terry Pratchett



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

* Re: Abstract methods in ADA95
  2002-10-23  9:29               ` Martin Dowie
  2002-10-23 10:36                 ` Ed Falis
  2002-10-23 10:37                 ` Preben Randhol
@ 2002-10-23 12:54                 ` John English
  2002-10-23 13:48                   ` Martin Dowie
  2 siblings, 1 reply; 39+ messages in thread
From: John English @ 2002-10-23 12:54 UTC (permalink / raw)


Martin Dowie wrote:
> 
> And don't get me started on "Oriented"!! It should be "Orientated" unless
> perhaps you're developing in, for example, China. ;-)

Nah... the verb is "to orient" (presumably eastwards :-) from which
"oriented" and "orientation". "Orientated" is a back-formation from
"orientation". Similar to "to sequester" hence "sequestered" and
"sequestration" -- so in the 80s, the government started "sequestrating"
union assets, rather than just sequestering them as you would expect.

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------



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

* Re: Abstract methods in ADA95
  2002-10-23 12:54                 ` John English
@ 2002-10-23 13:48                   ` Martin Dowie
  0 siblings, 0 replies; 39+ messages in thread
From: Martin Dowie @ 2002-10-23 13:48 UTC (permalink / raw)


"John English" <je@brighton.ac.uk> wrote in message
news:3DB69C05.3A9856F2@brighton.ac.uk...
> > And don't get me started on "Oriented"!! It should be "Orientated"
unless
> > perhaps you're developing in, for example, China. ;-)
>
> Nah... the verb is "to orient" (presumably eastwards :-) from which
> "oriented" and "orientation". "Orientated" is a back-formation from
> "orientation". Similar to "to sequester" hence "sequestered" and
> "sequestration" -- so in the 80s, the government started "sequestrating"
> union assets, rather than just sequestering them as you would expect.

It's one of those US-English v UK-English things:

(c) Cambridge Dictionary:
"orientate, especially American orient (AIM)
verb [T usually + adv/prep]
to aim (something) at someone or something, or make (something)
suitable for a particular group of people

The World Bank is taking steps to orientate its lending to
reducing poverty.

It is essential that the public sector orientates itself more
towards the consumer.

The industry is heavily orientated towards export markets."

As with all these things, once they get used frequently enough,
they become part of the language. I know I shouldn't get all
steamed up about them but 'methodology' _really_ bugs me!! ;-)





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

end of thread, other threads:[~2002-10-23 13:48 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-17 13:36 Abstract methods in ADA95 Hector Hugo
2002-10-17 14:39 ` Lutz Donnerhacke
2002-10-17 14:50 ` David C. Hoos
2002-10-17 14:57   ` Preben Randhol
2002-10-17 14:56 ` Preben Randhol
2002-10-17 16:18 ` Matthew Heaney
2002-10-17 19:26 ` Jeffrey Carter
2002-10-17 19:41   ` David C. Hoos
2002-10-17 20:34   ` Georg Bauhaus
2002-10-18 13:56     ` Frank J. Lhota
2002-10-18  0:40   ` Robert A Duff
2002-10-18 21:05     ` Jeffrey Carter
2002-10-18 22:00       ` Robert A Duff
2002-10-21 14:46       ` Wes Groleau
2002-10-18  3:13   ` SteveD
2002-10-18 14:44     ` Robert A Duff
2002-10-18 21:15       ` Dale Stanbrough
2002-10-18 21:08     ` Jeffrey Carter
2002-10-18 21:23       ` David C. Hoos
2002-10-18 21:37         ` Jeffrey Carter
2002-10-18 22:08           ` Robert A Duff
2002-10-21 15:03             ` Peter Amey
2002-10-21 15:04           ` Wes Groleau
2002-10-18 22:10       ` Robert A Duff
2002-10-19 12:40       ` SteveD
2002-10-19 18:40         ` Jeffrey Carter
2002-10-21 15:34           ` Martin Dowie
2002-10-21 19:37             ` Jeffrey Carter
2002-10-22 11:59               ` Georg Bauhaus
2002-10-22 12:24             ` Marin David Condic
2002-10-23  9:29               ` Martin Dowie
2002-10-23 10:36                 ` Ed Falis
2002-10-23 10:37                 ` Preben Randhol
2002-10-23 12:54                 ` John English
2002-10-23 13:48                   ` Martin Dowie
     [not found]         ` <aornkp$mpf$1@bob.news.rcn.net>
2002-10-19 18:54           ` Crapper (was: Re: Abstract methods in ADA95) Jeffrey Carter
2002-10-21 17:57         ` Abstract methods in ADA95 Programmer Dude
2002-10-21 18:58           ` Jim Rogers
2002-10-21 14:49       ` Wes Groleau

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