-
Notifications
You must be signed in to change notification settings - Fork 9
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
precedence of logical operators #39
Comments
I wonder if any Dylan code contained within Mindy relies upon this. |
One way to find out? On 29 October 2015 15:07:40 CET, Bruce Mitchener notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
@dram Have you tried fixing this and seeing what happens? |
I'm a bit busy recently, do not have time to inspect whole Mindy codebase for usages of logical operators. If someone can help out, please go ahead. |
A quick grep finds:
I think that it is safe to fix this bug. |
* mindy/compiler/info.c (init_info): According to DRM, `$` and `|` have same precedence and both are left-associative. Fixes dylan-hackers#39.
Just find that actually both precedence and association are incorrect. This bug is quite anonying, hope that no code rely on this. |
In DRM,
&
and|
have same precedence. Open Dylan is confirm to DRM, but in Mindy&
has higher precedence, as specified in compiler/info.c.For example, Open Dylan and Mindy show different result for following code:
Mindy:
Open Dylan:
Curious that why Dylan is designed to have same precedence for
&
and|
, which is different to many other languages.The text was updated successfully, but these errors were encountered: