Shared files & Closed files

Usage of the framework, compiler and tools

Shared files & Closed files

Postby Zinn » Sat Nov 25, 2017 4:59 pm

With issue-#22 we have add the procedures Shared() and Closed() to the Files interface.
Who have used the new procedure Shared() in the application program?
Who have used the new procedure Closed() in the application program?
Does exist a useful sample for using them?
- Helmut
Zinn
 
Posts: 58
Joined: Mon Nov 24, 2014 10:47 am

Re: Shared files & Closed files

Postby Zinn » Sat Dec 02, 2017 10:54 am

Nobody seems to care ...
Why I ask? Because BlackBox is incompatible between the Center and the Core solution.

B01: Files: HostFiles.NewWriter "returns" Trap 21 instead of NIL
https://forum.oberoncore.ru/viewtopic.php?t=1948
https://forum.oberoncore.ru/viewtopic.php?t=6169

Issue-#22: HostFiles.NewWriter violating the specification
https://forum.blackboxframework.org/viewtopic.php?t=77
https://redmine.blackboxframework.org/issues/22
https://forum.blackboxframework.org/viewtopic.php?t=170

According to the specification (System/Docu/Files) in case of read-only files NewWriter should return NIL. The current implementation, however, generates a TRAP.

The Oberon Core solution (B01) aligned the implementation (HostFiles) with the specification (Files).

The Center solution (Issue-#22) aligned the specification (Files) with the implementation (HostFiles). In order to be able to avoid the TRAP, two new File methods (Shared() and Closed()) should be introduced that return the file's current state.

So what? Which way would you like to follow?

You may have a look at http://www.zinnamturm.eu/downloads.htm

- Helmut
Zinn
 
Posts: 58
Joined: Mon Nov 24, 2014 10:47 am

Re: Shared files & Closed files

Postby Josef Templ » Sun Dec 03, 2017 10:44 pm

The center has discussed this issue extensively and there were no signs that the
chosen approach is unacceptable to oberoncore.

Actually, the center approach is very simple and systematic and IMHO superior:
It is not possible to open a writer on a closed file: results in a TRAP 20.
It is not possible to open a writer on a shared file: results in a TRAP 21.

In order to avoid a TRAP 20 you can check for Closed().
In order to avoid a TRAP 21 you can check for Shared().

- Josef
Josef Templ
 
Posts: 206
Joined: Tue Sep 17, 2013 6:50 am

Re: Shared files & Closed files

Postby Zinn » Tue Dec 05, 2017 2:52 pm

Currently I analyse OberonCore's latest BlackBox version build at 30.11.2017 and figure out what Core changed.
Some differences between Core and Center are incompatible and the Core has also some new futures.
For the 1st point look at https://forum.oberoncore.ru/viewtopic.php?t=6169
- Helmut
Zinn
 
Posts: 58
Joined: Mon Nov 24, 2014 10:47 am

Re: Shared files & Closed files

Postby Josef Templ » Tue Dec 05, 2017 9:11 pm

Zinn wrote:Currently I analyse OberonCore's latest BlackBox version build at 30.11.2017 and figure out what Core changed.
Some differences between Core and Center are incompatible and the Core has also some new futures.
For the 1st point look at https://forum.oberoncore.ru/viewtopic.php?t=6169
- Helmut


The practical relevance of the semantical difference is close to zero, I think.
Also the practical relevance of the binary incompatibility of symbol files between the
oberoncore and the center version is close to zero.

The introduction of Closed() and Shared() did not introduce an avoidable binary incompatibility
in the step from 1.6 to 1.7 because of other unavoidable interface changes.
It also completes the Files.File interface so that there are no interface changes because of that extension to be
expected in the future. It would be very strange to introduce an avoidable binary incompatibility
now by removing it again.

In general, if there are no bigger differences then we have achieved a lot, together.

- Josef
Josef Templ
 
Posts: 206
Joined: Tue Sep 17, 2013 6:50 am


Return to Common questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron