>I have read a somewhat obsure statement in BB dosc that
>procedure variables are a bad thing, and that one has to use
>"composition" instead, but I am not there yet to know what
Composition? No, just use objects instead of procedure
variables. Then things also become more extensible (you can
extend an object type, but not a procedure type; e.g., you could later
add state).
If you have objects, procedure variables are somewhat redundant.
Moreover, procedure variables pose problems for safe module
unloading, and they are not easily and efficiently implementable
on a Java virtual machine. Yes, internalize/externalize is also
a problem. Morever, procedure types belong to the exceptional
features in Oberon where compatibility by structure instead of by
name is used. These are some of the reasons why we have declared
procedure types as obsolete features in the Component Pascal
language report. They are still supported for the time being for
compatibility reasons, and they will probably remain available
at least for low-level programming tasks (OS callbacks etc.).
But they can easily be avoided in new code.
Cuno Pfister
Oberon microsystems, Inc.
Received on Sun Feb 14 1999 - 13:01:03 UTC