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
receive semantics #63
Comments
@vejmelkam this is a way better place to post i suspect. I don't even remember getting a mail from the mailing list in quite some time. You are right. Receive should not add that extra case clause. I suspect strongly this is a problem of code reuse. I will look into it. |
Thanks for merging the To fix this, I regenerated the Could someone with repository access regenerate the two files? Alternatively I can generate a pull request from my fork. |
@vejmelkam they should be regenerated automatically from the build. It would probably go much quicker if you would generate them and submit a PR. |
otherwise I will get to it as soon as I can |
Apologies for cross-posting but the joxa mailing list seems to be dead.
I see a difference in semantics of the joxa receive form and erlang receive. In erlang, a message not matching any patterns in a receive simply sits in the mailbox and receive keeps waiting until it matches. In joxa, sending a message that does not match any pattern in a receive results in a case_clause exception.
Compiling a simple test case from erlang to core erlang and from joxa to core erlang shows that joxa adds an extra case to the receive which matches everything and generates the case_clause.
In erlang the match everything pattern resulting in a case_clause error is only added for 'case' but not for 'receive'.
Joxa adds this for both receive and case, this seems to be due to :case and :receive expressions in joxa-cmp-expr using the same joxa-cmp-case/make-pattern function to generate the cerl-clauses.
Is this intentional? From #26 I got the impression that receive was supposed leave non-matching messages in the mailbox but it's an old message.
Thanks,
The text was updated successfully, but these errors were encountered: