Keith Shillington wrote:
> If we're arguing about syntax, it is tantamount to a religious
> discussion. One can write good or bad software in any language.
> The semantics of the language will have the greatest impact on
> how easy or hard this is to accomplish. The syntax mostly impacts
> how pretty the program looks in the long run.
I agree generally, but wish to raise two point (infidel :-)
- - - - -
1. A "class" package is not just a package with a tagged type in it.
There ARE semantic differences.
Even object.method notation carries a semantic connotation -- that a
specific object is the recipient of a message -- that cannot be
expressed in Ada.
An object receiving a message will be a controlling tagged parameter.
But a controlling parameter is not necessarily an object receiving
a message. First, there may be several controlling parameters, only
one of which is the "recipient", the rest are helpers. For that
matter, I've used tagged types when I wasn't even doing
object-oriented work, as they support programming by extension in a
general way.
So there is a semantic content that people would like to express,
and which must be hand-built in Ada (the way enumeration semantics
must be hand-built in C).
- - - - -
2. Syntax does have an impact on how clear and unambiguous the
semantics are to the reader. Granted, the most-often argued aspects
are more a matter of taste, e.g. whether "{ }" is better than "BEGIN
END". However, note that, for example, C's if-then-else syntax can
cause semantic confusion (migrating else clauses), and that Ada's
syntax helps prevent that semantic problem.
- - - - -
By the way, I note that you're responding to an earlier message
that says:
> >In message <[log in to unmask]>, [log in to unmask]
> >writes
> >>on a side point about no class construct in Ada: I feel it was a mistake
> >>not to add it in. I understand that the semantics of a class in there, but
> >>not the construct itself.
So perhaps you aren't yet responding to the broader discussion that
followed. I look forward to your input.
In my opinion, much of the semantics of "class" are in Ada 95 -- as
much as are in C++, if we want to set the bar that low -- but some of
them don't get as much automated support as I would like to see. And
the combination of pragmas and ASIS give us an opportunity to change
that, and to start advertising "more OO than C++!"
Best,
Sam Mize
--
Samuel Mize -- [log in to unmask] (home email) -- Team Ada
Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam
|