[Info-vax] Native compilers

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Fri Feb 25 13:51:24 EST 2022


On 2022-02-24, Arne Vajhøj <arne at vajhoej.dk> wrote:
> On 2/24/2022 1:40 PM, Simon Clubley wrote:
>> On 2022-02-24, Dave Froble <davef at tsoft-inc.com> wrote:
>>> I agree that .include is helpful.  Too bad it's missing in Macro-32.  I use
>>> quite a bit of %Include in Basic.
>> 
>> Even better languages take a module-based approach instead. :-)
>
> Usually modules are a binary encapsulation of large pieces
> thing while include is a source reuse of small pieces thing.
>
> Quite different.
>

Yes and no.

Modules can also expose constants and data structure definitions for
use by other modules in exactly the same way as the primary purpose
of include files does and can do it in a lot cleaner way.

There's no polluting a single global namespace with lots of unrelated
symbols and you can't use a confusingly named symbol from another 
unrelated include file by accident when you are using modules instead.

Those other include files may also end up using different values for
the same thing. (As an aside, does true always equal true these days ?)
Modules are a far better engineering approach than lots of include files.

You can't use modules for conditional compile-time evaluation, but
there are other more structured ways to handle _that_ problem.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.



More information about the Info-vax mailing list