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

Default double_quotes flag should be chars #183

Closed
ichiban opened this issue Mar 23, 2022 · 3 comments
Closed

Default double_quotes flag should be chars #183

ichiban opened this issue Mar 23, 2022 · 3 comments
Milestone

Comments

@ichiban
Copy link
Owner

ichiban commented Mar 23, 2022

#176 (comment)

The current default is codes, which follows GNU Prolog.

doubleQuotesCodes doubleQuotes = iota

@ichiban ichiban added this to the v0.9.0 milestone Mar 23, 2022
@ichiban
Copy link
Owner Author

ichiban commented Mar 23, 2022

The ISO standard says the default value is implementation defined.

7.11.2.5 Flag: double-quotes

Possible values: chars, codes, atom

Default value: implementation defined

Changeable: Yes

@guregu
Copy link
Contributor

guregu commented Mar 23, 2022

I like chars as a default. @triska's lesson on DCGs outlines a good argument for using it. Alignment with Scryer and Tau is also nice.
https://www.metalevel.at/prolog/dcg

@ichiban
Copy link
Owner Author

ichiban commented Mar 24, 2022

Done! This change will be in the next release v0.9.0.

$ go run cmd/1pl/main.go 
?- current_prolog_flag(double_quotes, V).
V = chars.
?- X = "abc".
X = [a, b, c].

@ichiban ichiban closed this as completed Mar 24, 2022
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

No branches or pull requests

2 participants