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

Opt-in occurs check #54

Open
foxfriends opened this issue Feb 14, 2021 · 1 comment
Open

Opt-in occurs check #54

foxfriends opened this issue Feb 14, 2021 · 1 comment
Labels
enhancement New feature or request
Projects

Comments

@foxfriends
Copy link
Owner

Prolog does not use the occurs check by default because it is very slow. With some quick testing, I have determined that by not using occurs check in Lumber, significant performance improvements can be made. If we make occurs-checking opt-in (at the language level) that should help with performance. New syntax ("pattern with occurs check") will be required, maybe this is where the # comes in?

X =:= [X].  // pass
#X =:= [X].  // fail
X =:= #[X].  // fail
X =:= [#X].  // fail
@foxfriends foxfriends added this to RFC in Features via automation Feb 14, 2021
@foxfriends foxfriends added the enhancement New feature or request label Feb 15, 2021
@foxfriends foxfriends moved this from RFC to In progress in Features Feb 21, 2021
@foxfriends foxfriends changed the title Less occurs check Opt-in occurs check Feb 21, 2021
@foxfriends
Copy link
Owner Author

I have disabled occurs check entirely for now. It's just too slow for it to be used always. The option to opt-in to the occurs check should be added at some point... I don't think the # syntax will work, maybe a keyword occurs?

foxfriends added a commit that referenced this issue Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Features
In progress
Development

No branches or pull requests

1 participant