[Oberon] A pseudo-problem?

Daniel Keller keller at creacare.com
Tue Dec 9 17:54:24 CET 2003


Vasile,

We will try to make Paco complient to the standard. Paco will support at least WITH := Qualident : Qualident. Ev. WITH := Designator
: Qualident, but that's not clear yet.
We also will give up the perfomance gain of WITH and introduce type checks so that the following will trap:

(* type Child is extension of type Parent *)
PROCEDURE Bar(p: Parent);
    PROCEDURE NewParent;
    BEGIN
        NEW(p);
    END NewParent;

BEGIN
    IF p IS Child THEN
        WITH p: Child DO
            NewParent;
            (* p has dynamic type Parent, but fields of Child are still accessible !!! *)
        END;
   END;
END Bar;


regards,
Daniel



 You cannot do

   WITH foo.bar: Bar DO (* stuff *) END;

either using Compiler OR PC. Still the Oberon Report states clearly:

  WITH qualident : qualident DO .. END;

 Checking the (dinamic) type of a exported variable may be bad practice,
but checking the type of a RECORD field may have some uses.

Regards, Vasile

PS. I am just curious if this qualifies as gratitude :)
--
Oberon at inf.ethz.ch mailing list for ETH Oberon and related systems
https://www.mail.inf.ethz.ch/lists/listinfo/oberon




More information about the Oberon mailing list