[Oberon] Module aliases - what is the correct way to handle them
schierlm at gmx.de
Sat Feb 15 19:17:35 CET 2020
Am 14.02.2020 um 08:02 schrieb Andreas Pirklbauer:
> 1. First, some history: For decades I was secretely hoping that module aliases would one day go way from the language and that I therefore would ever have to expend scarce brain cycles on such an uninteresting topic. But they didn’t go away - some people seem to find them useful.
I tend to use them when I want to use two copies of the same module (or
modules) at the same time. For example when I want to compare an
unmodified ORP to my own modified ORP, or when I want to have original
TextFrames (Log and System.Tool and the viewers to edit TextFrames.Mod)
alongside to modified TextFrames (where I want to test changes), or have
TextFrames that use the original Fonts module alongside TextFrames that
use a modifed Fonts module.
I once even used it for two different FileDir/Files modules to be able
to copy files between filesystems (with different filesystem offset, of
I do this by prefixing one copy of the files with e.g. X, (and maybe
another set with Y), and aliasing the imports back so I don't have to
replace them in the rest of the file.
When finished, it is easy to diff the files and incorporate the changes
I like to the original files, as only the first (and last) lines of the
file are changed.
More information about the Oberon