🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4801

Re: Are procedure types breaking modules?

#4801
From: Frans van Otten
Date: Tue, 02 May 1989 13:47
43 lines
2063 bytes
Brock@tuvie (Inst.f.Prakt.Info 1802) writes:

>Frans van Otten writes:
>
>>The fact that he manages to write a lot of contradictionary
>>things (even within one book)...
>
>Can You justify this??

I'm not sure if I can justify it.  Maybe I put it a bit hard.  But
fact is that in some stages of the project (building a Modula-2
compiler) I really didn't understand what Wirth meant with some
things he wrote (as compared to other things he wrote in the same
book).

>>Also, he is not clear on why some things are or
>>are not allowed.  Why is it that you are not allowed to assign a
>>local procedure to a procedure variable ?
>
>This is absolutely clear: a local procedure has possibly a scope
>that globals have not.

So what ?  From within a local procedure it is perfectly possible
to call the procedure it is local to, even if this is a local
procedure.  Within its scope it should be assignable and callable.

>>Why can't a standard procedure be assigned to a procedure variable ?
>
>Because some of them are _generic_. It would really exceed the
>aim of Modula to allow generic procs in general. Take for
>example SIZE if You assign SIZE to a procedure variable, which
>is already typed, the result would be already fixed. Well it
>would make some sense, but not very much at all...

It does make some sense.  And as Wirth didn't make it easy for
compiler writers anyway, I don't understand why he makes it (a bit)
easier here.

-- 
	Frans van Otten
	Algemene Hogeschool Amsterdam
	Technische en Maritieme Faculteit
	fransvo@htsa.uucp
Technical Details
Message-ID: <856@htsa.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!htsa!fransvo
References: <688@tuvie> <849@htsa.uucp> <690@tuvie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!htsa!fransvo
From: fransvo@htsa.uucp (Frans van Otten)
Newsgroups: comp.lang.modula2
Subject: Re: Are procedure types breaking modules?
Keywords: procedure types, modules
Message-ID: <856@htsa.uucp>
Date: 2 May 89 13:47:56 GMT
References: <688@tuvie> <849@htsa.uucp> <690@tuvie>
Organization: AHA-TMF (Technical Institute), Amsterdam, The Netherlands
Lines: 43