[Oberon] Oberon for a C++ user.

Srinivas Nayak sinu.nayak2001 at gmail.com
Sat Nov 12 08:39:10 CET 2016


> I guess you can perhaps devise a devious example
> where a top level module installs a procedure variable (a "hook")
> in the lower level module, and this causes chaos upon finalization.
> I am guessing that Andreas has fixed that. Barring such deviousness,
> the finalization is intended to deal with freeing resources
> such as files or communication channels.
>  Its use should be restricted to such straightforward cases.

Yes, Andreas wrote...

"The case of inheritance (type extension in Oberon) is now fully covered in the latest version of safe module unloading in Experimental Oberon. ..."

Can anybody please summarize how he mitigated the problem?
I was thinking, Finalization can help us here.
But, interested to know the approach taken by Andreas to barring such deviousness.



With thanks and best regards,

Yours sincerely,
Srinivas Nayak

Home: http://www.mathmeth.com/sn/
Blog: http://srinivas-nayak.blogspot.in/

On 11/12/2016 05:59 AM, Skulski, Wojciech wrote:
> Lars:
>
>> How did they decide on order of finalization in a multi module project?
>> What if finalization calls code, from a module that's already unloaded?
>
> The modules can be unloaded in the reverse import order. The idea is that the lower level (imported) modules are servers. If a server is imported then it cannot be unloaded. It is closely related to the other thread "Safe unloading". Your concerns were addressed by Andreas.
>
> I guess you can perhaps devise a devious example where a top level module installs a procedure variable (a "hook") in the lower level module, and this causes chaos upon finalization. I am guessing that Andreas has fixed that. Barring such deviousness, the finalization is intended to deal with freeing resources such as files or communication channels. Its use should be restricted to such straightforward cases.
>
> I am not sure if we need to worry about hundreds of modules at this point.
>
> Wojtek
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>


More information about the Oberon mailing list