At 06:16 AM 11/17/98 GMT, Simon Wright wrote:
> From: Samuel Mize <[log in to unmask]>
> Perhaps a "class" package would also require that all the subprograms
> in the package have the controlling operand as the first parameter
> (the return value, for functions). This would help out the people who
> find the syntax "object.message" to be more readable.
This is starting to get silly. Ada is a very rich language, and while I
can understand having a tool to detect some departures from local coding
standards and software engineering practices, putting on a straight-jacket
is not all that good an idea. For example:
type Set is...
function "+"(L,R: Set) return Set;
function "-"(L: Set, R: Element) return Set;
-- and so on.
In addition if you really prefer the class.method(parameters) notation,
Ada has it all over the place:
and of course, and most important:
where the package is often a generic instance and is used as an object of
the class defined by the generic template. This is a very powerful
technique in Ada, and is one of many models that a good software engineer
will consider when choosing how to model a particular class of objects in a
particular design. Generic instance as object is not a good model if you
have many objects of the class, or if the number of objects is highly
dynamic. But it is great when you have objects with no particular
hierarchy, and many different types of state variables.
Robert I. Eachus
function Message (Text: in Clever_Ideas) return Better_Ideas is...