[Oberon] Compiler Modules Empty?
chris at cfbsoftware.com
Sun Apr 13 14:45:56 CEST 2014
> -----Original Message-----
> From: Jan Verhoeven [mailto:jan at verhoeven272.nl]
> Sent: Sunday, 13 April 2014 9:36 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Compiler Modules Empty?
> Paul Onyschuk wrote:
> > Section 11.1 in "The Programming Language Oberon-07"
> > (Oberon07.Report.pdf) is describing module SYSTEM. It explain
> > existence of this pseudo module.
> Since the new project is going multi platform, wouldn't it make sense to
> tinke SYSTEM out of the core and make it easier to create a target
> specific SYSTEM module?
> Modula-2 (at least the Mocka variant) had the option to make FOREIGN
> modules in a very simple way.
No. There's a difference between SYSTEM modules and FOREIGN modules. FOREIGN
modules are a mechanism for importing code that is implemented using a
different computer language (e.g. C).
Modula-2 had SYSTEM modules as well as FOREIGN modules. See
"System-dependent facilities" in Section 12 of the Report on The Programming
Language Modula-2. There it says:
"Note: Because the objects imported from SYSTEM obey special rules, this
module must be known to the compiler."
Special rules include the ability to pass variables of different types to
the same parameter (without having to use type extension), to have procedure
declarations with optional parameters, produce inline instructions without
procedure call/return instructions sequences. etc.
More information about the Oberon