RE: Procedure types

From: Fyodor Tkachov <"Fyodor>
Date: Sat, 20 Nov 2004 08:56:57 +0300

----boundary-LibPST-iamunique-1300299003_-_-
Content-type: text/plain

Wojtek, the idea is interesting but seems to require a lot of run-time overhead:

When a request to unload a module comes from somewhere, how the run-time would know all the procedure variables that point to the module's procedures? A list has to be maintained with back references. This contradicts the Oberon philosophy: complex things should be made manifest to the programmer.
Procedure variables are a low-level tool, and should perhaps be kept that way -- and you were perfectly right with your suggestion about SYSTEM.

(Sorry, I did not acknowledge your priority with the idea -- as I did not with Stan's proposal to pre-package standard function objects; plunged into discussion without studying the accumulated mail...)

Function types provide a convenient mechanism, additional "tagged procedure variables" may be an overkill. I don't know -- it's a matter of balance and compromise.

Cheers
Fyodor

> On Fri, 19 Nov 2004, Fyodor Tkachov wrote:
>
> > A procedure variable is just an address of the entry point

> > into the procedure: there is no auxiliary information
> > to help the run-time system.
>
> Is this a statement of current implementation or a statement of necessity?
> Does it have to be so?
>
> This may be similar to safe versus unsafe arrays.
>
> In Fortran and C, an array is just an address of the 1st element and there
> is no auxillary info such as index bounds. As a consequence, arrays in
> Fortran or C are unsafe and lots of fun can happen using them.
> IN CP arrays have been made safe and the fun is long gone, thank goodness.
>
> How about the procedure variables? Can they be made similarily safe?
>
> How about differentiating between safe high-level procedure variables
> and low-level [untagged] procedure variables that you would need to
> interface with Windows and/or Linux?
> The latter would only be available under SYSTEM,
> same as [untagged] records and [untagged] arrays.
> Similar problem, similar solution.
>
> Note, I am not a compiler writer, so I am only posing this is a question.
> I do not know whether safe procedure variables can be implemented.
> I also do not know whether or not the current BB implementation is safe.
>
> W.

Powered by the E-mail PIM - Info Select - www.miclog.com
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1300299003_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFdvanRlaywgdGhlIGlkZWEgaXMgaW50ZXJlc3Rp
bmcgYnV0IHNlZW1zIHRvIHJlcXVpcmUgYSBsb3Qgb2YgcnVuLXRpbWUgb3ZlcmhlYWQ6XHBhcg0K
XHBhcg0KV2hlbiBhIHJlcXVlc3QgdG8gdW5sb2FkIGEgbW9kdWxlIGNvbWVzIGZyb20gc29tZXdo
ZXJlLCBob3cgdGhlIHJ1bi10aW1lIHdvdWxkIGtub3cgYWxsIHRoZSBwcm9jZWR1cmUgdmFyaWFi
bGVzIHRoYXQgcG9pbnQgdG8gdGhlIG1vZHVsZSdzIHByb2NlZHVyZXM/IEEgbGlzdCBoYXMgdG8g
YmUgbWFpbnRhaW5lZCB3aXRoIGJhY2sgcmVmZXJlbmNlcy4gVGhpcyBjb250cmFkaWN0cyB0aGUg
T2Jlcm9uIHBoaWxvc29waHk6IGNvbXBsZXggdGhpbmdzIHNob3VsZCBiZSBtYWRlIG1hbmlmZXN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VjdGlvbnMgb24gdGhlaXIgdXNhZ2UsIHNlbmQgYSBtZXNzYWdlIGNvbnRhaW5pbmcgdGhlIHdv
cmQgImhlbHAiIHRvIHRoZSBhYm92ZSBhZGRyZXNzLlxwYXINClxwYXINClNlbmQgYW55IHByb2Js
ZW0gcmVwb3J0cyBvciBxdWVzdGlvbnMgcmVsYXRlZCB0byB0aGlzIGVtYWlsIGxpc3QgdG8gdGhl
IGxpc3Qgb3duZXIgYXRccGFyDQogICBvd25lci1ibGFja2JveEBvYmVyb24uY2hccGFyDQpccGFy
DQpDdXJyZW50IHBvc3RpbmcgcG9saWN5OlxwYXINClxwYXINCmEpIFRvIHBvc3QgeW91IHNob3Vs
ZCB1c2UgdGhlIHNhbWUgYWRkcmVzcyBieSB3aGljaCB5b3UgYXJlIHN1YnNjcmliZWQgdG8gdGhl
IG1haWxpbmcgbGlzdC4gVGhhdCB3YXksIHRoZSBsaXN0IHNlcnZlciB3aWxsIHJlY29nbml6ZSB5
b3UgYXMgc3Vic2NyaWJlciBhbmQgZm9yd2FyZCB5b3VyIHBvc3RpbmcgaW1tZWRpYXRlbHksIHdp
dGhvdXQgY3JlYXRpbmcgYW55IG92ZXJoZWFkLlxwYXINClxwYXINCmIpIElmLCBmb3Igc29tZSBy
ZWFzb24sIHlvdSBjYW5ub3QgcG9zdCBmcm9tIHRoZSBhZGRyZXNzLCBieSB3aGljaCB5b3UgYXJl
IHN1YnNjcmliZWQsIHlvdXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFt
LiBQbGVhc2UgdW5kZXJzdGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21l
IGRlbGF5LCBpbiBwYXJ0aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWRheXMuXHBhcg0KfQ=


----boundary-LibPST-iamunique-1300299003_-_---
Received on Sat Nov 20 2004 - 06:56:57 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:30 UTC