[Oberon] Modula2 vs Oberon IMPORT
Duke Normandin
dukeofperl at ml1.net
Sat Jan 8 05:50:56 CET 2011
On Fri, 7 Jan 2011, Aubrey.McIntosh at Alumni.UTexas.Net wrote:
> On Fri, Jan 7, 2011 at 9:39 PM, Duke Normandin <dukeofperl at ml1.net> wrote:
> > Happy New Year Everybody!
> >
> > I see that in Modula only the required procedures are IMPORTed, like:
> >
> > FROM STextIO IMPORT WriteString, WriteLn;
> >
> > Conversely, in Oberon, the whole Module has to be IMPORTed in order to
> > get to use the equivalent procedures.
> >
> > It would seem to me that Oberon "programs" would be that much more
> > "bloated" with unnecessary code. Am I correct in this conclusion? Is
> > there a way to selectively IMPORT procedures in Oberon? It doesn't
> > appear to me to be possible.
> > --
>
> The IMPORT does indeed specify the entire module in Oberon.
>
> When Modula-2 was the state of the art, I only became aware of 1
> compiler that imported individual procedures, the other
> compiler/linker technologies imported the entire module. The change
> made programs more readable.
The Modula-2 syntax is a bit deceptive there, it seems.
FROM <some_module> IMPORT <this_procedure>, [<that_procedure>]
seemed to imply (to me, at first glance), selective procedure
inclusion. Whatever! Not a big deal; I was just curious.
> If you have the sources, you can make custom versions if you work in
> some environment where resources are that tight. However, Oberon
> programs are very light compared to their competitors, so this might
> be a red herring.
I suppose a good C programmer could hack an Oberon compiler all to
hell if he wanted to. :D
--
Duke
More information about the Oberon
mailing list