[net.lang.mod2] Overloading in Modula-2?

Barry_Cornelius@DURHAM.MAILNET (03/10/86)

I've been reading some of the recent mailings about overloading.
I would like to agree with Sieben van der Zee who says:
   I don't think the discussion about overloading belongs
   in a newsgroup about Modula-2, since this language does
   not provide overloading facilities.

I am a member of the Modula-2 working group of the British Standards
Institution.   We held an open meeting in Slough, England last April.
One member of the group presented a paper on operator overloading
in the context of opaque types.   These ideas were regarded as "Modula-3"
by most of the people present at the meeting.

There have been many references in info-modula-2 to overloading
a procedure called PUT.   The Draft BSI Standard I/O Library has
routines which deal with the input and output of CHARs, CARDINALs,
INTEGERs, BOOLEANs and REALs.   If you want to write a character,
you can use:
   CharIO.Write(channel, charactervaluetobewritten);
If you want to write a CARDINAL value, you can use:
   CardIO.Write(channel, cardinalvaluetobewritten);
And so on.   The modules CharIO, CardIO, ... form part of the Draft
BSI Standard I/O Library.   I see this as a very satisfactory solution
to the naming problems.

Why should the language be extended to include operator overloading
and procedure overloading?   Why not use the programming language Ada
if you want these facilities?

nagler%orb@SUN.ARPA (Rob Nagler) (03/11/86)

	There have been many references in info-modula-2 to overloading
	a procedure called PUT.   
The procedure PUT I mentioned was from the module Text_IO in Ada.
I was using it as a bad example, sorry for the confusion.

	The Draft BSI Standard I/O Library has routines which deal with 
	the input and output of CHARs, CARDINALs, INTEGERs, BOOLEANs and REALs.
Yippee.  When can us mortals have a look?  I'd like to try
implementing it instead of the one I hacked up.  I know its only
a draft, but then that's what Wirth's book really is, isn't it?

Rob