comp.lang.ada
 help / color / mirror / Atom feed
From: Jim Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: OO dot notation
Date: Fri, 16 Aug 2002 19:44:19 GMT
Date: 2002-08-16T19:44:19+00:00	[thread overview]
Message-ID: <3D5D55F0.7000605@worldnet.att.net> (raw)
In-Reply-To: 1029357303.33848@master.nyc.kbcfp.com

Hyman Rosen wrote:

> For all those who have been arguing that Ada would be much
> more successful if it allowed the object.method() syntax,
> it might be interesting to check out some of the goings on
> in comp.lang.c++.moderated, in the 'Guru of the Week #84'
> threads. Many of the C++ cognoscenti are coming to the
> conclusion that the method(object) notation is superior,
> and indeed that as few functions as possible should be made
> methods of a class.
> 

I had been following this thread a while back.
It seems that one of the big issues in C++ is the use of
functions inherited from a template parameter. If the function
is part of a class the object.method() syntax is required while
the method(object) syntax is required if the function is not
part of a class. This causes genuine problems for C++.

The cognoscenti mentioned above have determined that the
method(object) syntax is the most general, and this leads to
the conclusion that functions should not be made members of
a class unless absolutely necessary.

My guess is that the C++ language will not be changed for this.
Instead, people will simply be advised to limit their use of
functions defined within a class.

I assume that this tends to weaken a design's OO nature. It will
result in a lot of basically global functions. This can result in
weaker encapsulation of data within classes, and many other such
problems.

Jim Rogers




  parent reply	other threads:[~2002-08-16 19:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-14 20:35 OO dot notation Hyman Rosen
2002-08-15  4:03 ` Pat Rogers
2002-08-15 16:05 ` Ingo Marks
2002-08-16 16:00   ` Warren W. Gay VE3WWG
2002-08-16 19:44 ` Jim Rogers [this message]
2002-08-16 20:09   ` Hyman Rosen
replies disabled

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