[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SOMEWHAT OFF-TOPIC] Definition Module is a Misnomer, how can we exp
From: |
Christoph Schlegel |
Subject: |
Re: [SOMEWHAT OFF-TOPIC] Definition Module is a Misnomer, how can we explain this? |
Date: |
Wed, 7 Jun 2023 21:56:47 +0200 |
Am Tue, 6 Jun 2023 16:50:59 +0900
schrieb Benjamin Kowarsch <trijezdci@gmail.com>:
> On Tue, 6 Jun 2023 john o goyo wrote:
>
> >
> > I have always regarded the definition module as the file that
> > defines the interface to the module.
> >
>
> I have thought of that myself, but it doesn't really help because if
> we apply the same logic to implementation modules, they would be
> definition modules, too since they *define* the implementation.
>
> I was curious about the origin of the term and suspected that it
> wasn't Wirth who came up with it, because he didn't design Modula-2.
> Xerox did.
>
> And indeed, the terminology does go back to Xerox PARC.
>
> The Mesa Language manual (Version 5.0) states on page 101:
>
> "An interface is a connector between programs: it allows code in one
> module to access parts of other modules, specifically procedures,
> signals and variables. Interfaces are _defined_ by definitions
> modules."
>
> However, it then immediately continues:
>
> "They contain _declarations_ for public items ..."
>
> It boggles the mind. It's not even a naive mistake that crept in due
> to somebody mixing up definition and declaration. It clearly shows
> they knew that they were using incorrect and counterproductive
> terminology. It smacks of one of those cold war "Just to confuse the
> Russians" things.
>
> So the blame goes to Lampson, Mitchell, Satterwhite, Geschke and
> Sweet at Xerox. Although, as a university professor, Wirth could and
> should have spotted this folly and corrected it when he gave Mesa a
> Pascalian syntax facelift that resulted in Modula-2. A very
> unfortunate missed opportunity.
>
> To their credit, many of the people who worked on Mesa at Xerox PARC
> later went to DEC's Research Center where they then worked on DEC's
> Modula-2+ and Modula-3 languages and corrected their erstwhile
> mistake by changing terminology and syntax to _interface_ module.
>
> I am a great believer in the single syntax principle and thus not a
> friend of synonym symbols, but this whole thing tempts me to add
> INTERFACE as a synonym for DEFINITION to my compiler. If even the
> guys who messed this up corrected their own mistake, it seems silly
> not to follow their example.
>
> Anyway, thanks for the feedback.
>
> regards
> benjamin
>
Hi,
I see the problem but.
I always thought the important thing is to hide information not needed
for the users of the module. Teams also should be able to work on
different tasks without having to care about implementation details.
Like: I can write a text on lots of computers, but I don't really
understand completely how they work. I can drive most cars, because I
have the usual interface.
Of course you are right, it is not a "definition", but it is Modula-2
from 197x at last: the definition module just defines the interface to
the module...
Users guide (.def) versus developers documentation (.mod)?
I would not invest too much energy in semantic problems related to a
programming languge which will soon turn 50 - it is a definition
module for a long time now :-) but why not add the INTERFACE synonym to
R10?
Regards
C.