Unreferenced/unused code in Project Oberon 2013
Hello, I used some scripts to identify unreferenced code (after stumbling upon some unused variables in TextFrames), and was surprised how much code I could remove without affecting the system at all... (I also removed System.ExtendDisplay, as that one is of no use in Project Oberon, but apart from that I tried not to remove any command procedures.) Does anyone know if that code is there to be useful in the future, or did Prof. Wirth just not yet find the time to finish his software (which, if I recall correctly, is not finished when there is nothing left to add, but nothing left to take away)? Here is a diff: https://github.com/schierlm/OberonXref/blob/remove-unreferenced-code/remove-... And here is a side-to-side view: https://github.com/schierlm/OberonXref/commit/e49dddb57d076ef6a256496949d15a... Regards, Michael
I proposed some (other) changes to the system but NW told me lately that his aim is to keep the interface of the modules as stable and untouched as possible. I could imagine that this was the reason why he didn’t remove ExtendDisplay. But I agree, he could have commented out the procedure body. br Jörg
Am 27.04.2019 um 22:42 schrieb Michael Schierl <schierlm@gmx.de>:
Hello,
I used some scripts to identify unreferenced code (after stumbling upon some unused variables in TextFrames), and was surprised how much code I could remove without affecting the system at all... (I also removed System.ExtendDisplay, as that one is of no use in Project Oberon, but apart from that I tried not to remove any command procedures.)
Does anyone know if that code is there to be useful in the future, or did Prof. Wirth just not yet find the time to finish his software (which, if I recall correctly, is not finished when there is nothing left to add, but nothing left to take away)?
Here is a diff: https://github.com/schierlm/OberonXref/blob/remove-unreferenced-code/remove-...
And here is a side-to-side view: https://github.com/schierlm/OberonXref/commit/e49dddb57d076ef6a256496949d15a...
Regards,
Michael -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Michael Schierl Sent: Sunday, 28 April 2019 6:13 AM To: ETH Oberon and related systems Subject: [Oberon] Unreferenced/unused code in Project Oberon 2013
Hello,
I used some scripts to identify unreferenced code (after stumbling upon some unused variables in TextFrames), and was surprised how much code I could remove without affecting the system at all... (I also removed System.ExtendDisplay, as that one is of no use in Project Oberon, but apart from that I tried not to remove any command procedures.)
Does anyone know if that code is there to be useful in the future
Yes - don't even think about changing anything that is currently exported! The code might not be used in the Project Oberon operating system itself or the examples supplied with it but that does not mean it is not useful in other applications that are designed to be run on the operating system. Just as an example, in Astrobe for RISC5 we use some of the Files functions that you have marked as unreferenced, in association with HCFiler: http://www.astrobe.com/HCFiler/ReadMe.htm Regards, Chris Chris Burrows CFB Software http://www.astrobe.com/RISC5
Michael I would not have done some of your changes. Just to give you some examples why it is as it is: - FileDir: With your changes it will be difficult to write a module to repair disks, as all important fields are now hidden - Display: By deleting the main dispatch handler Handle() it gets more difficult to code own new window managers. By deleting Base, it’s not possible anymore to write a generic procedure to copy frame content to memory. With other resolutions, Base might change but the copy procedure could be left untouched. -Kernel: It’s not wise to delete StackSize. If you want to improve, rather use StackSize in Modules instead of using a constant there. -Modules: by hiding important parameters of a module, writing a debugger gets more difficult. br Jörg
Am 27.04.2019 um 22:42 schrieb Michael Schierl <schierlm@gmx.de>:
Hello,
I used some scripts to identify unreferenced code (after stumbling upon some unused variables in TextFrames), and was surprised how much code I could remove without affecting the system at all... (I also removed System.ExtendDisplay, as that one is of no use in Project Oberon, but apart from that I tried not to remove any command procedures.)
Does anyone know if that code is there to be useful in the future, or did Prof. Wirth just not yet find the time to finish his software (which, if I recall correctly, is not finished when there is nothing left to add, but nothing left to take away)?
Here is a diff: https://github.com/schierlm/OberonXref/blob/remove-unreferenced-code/remove-...
And here is a side-to-side view: https://github.com/schierlm/OberonXref/commit/e49dddb57d076ef6a256496949d15a...
Regards,
Michael -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (3)
-
Chris Burrows -
Jörg Straube -
Michael Schierl