[GAP] Ada 2005 object.method doesn't always dispatch

Erhard Ploedereder ploedere at informatik.uni-stuttgart.de
Mon Feb 20 18:40:49 CET 2006


> How do you teach this to students without confusing them? ;-)

Very simply: 
"If the actual or prefix doesn't statically say "'Class" in its decl or
type, the call isn't dispatching. No buts, no ifs."
"In order to be a dispatching operation to begin with (I.e., an operation 
that MIGHT dispatch under rule 1), you need to be a primitive operation. 
No buts, no ifs."

(I am sure someone can come up with a "but" and an "if", where I am wrong,
but it is bound to be a rather sophisticated example.)

And this is hardly more difficult than: everything is dispatching, unless
you say Super or static or ...., in which case ....

Erhard


More information about the GAP mailing list