Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: add de facto standard dialect and version_data read-only flags #84

Closed
wants to merge 1 commit into from
Closed

WIP: add de facto standard dialect and version_data read-only flags #84

wants to merge 1 commit into from

Conversation

pmoura
Copy link
Contributor

@pmoura pmoura commented Apr 3, 2019

Reason for the WIP mark: Is there a way to set the version_data flag definition from the version data in the Cargo.toml?

@mthom
Copy link
Owner

mthom commented Apr 3, 2019

Not without an ugly kludge, no; cargo is very limited in this way.

I'm hesitant to approve this pull request for a few reasons. The first is that, as you observe, there's no good way to synchronize version information between builtins.pl and Cargo.toml. The second is that strict ISO conformance means that the code in builtins.pl should be portable across all ISO-compliant implementations (on that note, I will eventually move the forall/2 predicate into a different module). I don't think the version_data flag exists as part of the ISO standard, but that's not to say it couldn't exist in some other form.

@UWN cited part of the ISO standard that talks about offering a strict conforming mode, and ushering the non-conformant parts into a separate library (by the sound of it). I'll have a look at it later today when I get home from work.

@pmoura
Copy link
Contributor Author

pmoura commented Apr 3, 2019

These two flags originated from the Prolog Commons work and were specified in the last ISO Prolog Core revision proposal where I served as editor back in 2009 (http://logtalk.org/plstd/core.pdf). By that time, these flags were already implemented by most Prolog systems, hence their inclusion in the proposal. But these flags were left out in the final approved corrigenda. Same for the forall/2 predicate. Moving de facto standard predicates such as forall/2 to a separate library or module works. But that becomes trickier/cumbersome for de facto standard flags and arithmetic functions.

@UWN
Copy link

UWN commented Apr 4, 2019

Many of these features were rejected in 2009 Pasadena and 2010 Edinburgh. And thus were not included in neither Cor.2:2012 nor Cor.3:2017.

In any case, don´t get sucked up by such petty items, Instead there are much more important things than this.

@pmoura
Copy link
Contributor Author

pmoura commented Apr 4, 2019

Many of these features were rejected in 2009 Pasadena and 2010 Edinburgh. And thus were not included in neither Cor.2:2012 nor Cor.3:2017.

With the exception of the call/N specification, the document linked above reflects the decisions in the 2009 Pasadena meeting. I know. I was there. I was the official editor of the Core revision proposal at that time.

In any case, don´t get sucked up by such petty items, Instead there are much more important things than this.

There are not petty items. They are simple features, trivial to implement, that facilitate writing of portable code by allowing an application to query which system and which system version it is running on and act accordingly.

@mthom
Copy link
Owner

mthom commented Apr 5, 2019

Once the discontiguous directive is implemented, it should be possible to add the additional flags outside of builtins.

@triska
Copy link
Contributor

triska commented Jul 19, 2020

They are simple features, trivial to implement, that facilitate writing of portable code by allowing an application to query which system and which system version it is running on and act accordingly.

Other effects include: For Prolog application programmers, to unnecessarily increase the tendency to think in terms of systems and versions instead of supported features. For new Prolog systems, to then also require adaptations in existing application code, even though they may support all necessary features to run the code. Further, it counterproductively removes pressure from implementors to implement common and standard functionality, because it shifts the pressure from a few system implementors to many more application programmers.

An example of the detrimental effects of such a flag can be seen in #583 (comment): Having heard of such a flag, application programmers now ask for the flag instead of standard functionality that should be implemented instead.

Regarding the topic of politics that was brought up in #511 (comment) about this flag, I would like to note that even though some may benefit from a fragmentation of Prolog systems into different systems and versions, many application programmers do not, and personally, I would strongly prefer flags that let me test for features instead of specific systems. A good example to test for functionality is the ISO flag bounded to test whether unbounded integers are available. This works reliably in all existing and future conforming systems, and is therefore a general and in my view preferable way to solve portability issues.

@pmoura
Copy link
Contributor Author

pmoura commented Sep 30, 2023

Standardization is first and foremost about finding common ground and formalizing it. The two flags in this proposal are universal and have been for a very long time. But more than four years passed since this merge request was created and no progress have been made. No point in keeping it open.

@pmoura pmoura closed this Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants