Superfluous need for a custom constructor #775
vinipsmaker
started this conversation in
General
Replies: 1 comment
|
We don’t do anything to guess how the custom constructor for the superclass should be called, so it would be called like the default constructor (with three by-position arguments for the fields), which causes a run-time arity error. (I think this should be improved as a compile-time error, but more work needs to be done, cf. #459.) But, the code doesn’t need a custom constructor anyway, if you just move the keywords into the field specifications: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
So I have this code (I'm not gonna try to shorten even more because the code is already pretty short):
When I try to instantiate a
RParen, it works:However if I remove the constructor line from
RParen:Racket complains quite a lot. What's the value of this line anyways? It's doing nothing here.
All reactions