Created
January 19, 2017 23:07
-
-
Save raiph/5c6ce5013ff4918eab1060472de4d891 to your computer and use it in GitHub Desktop.
One body shared by multiple signatures (Tentative proposal for 6.d)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is one of several gists I've written that relate to several distinct tentative proposals for 6.d that make sense both independently and together. | |
This gist discusses a long conjectured feature that would work nicely with the other proposals: | |
Others include: | |
* [Implicit/explicit mutation in 6.c](). | |
---- | |
In 6.c one can write two methods thus: | |
multi method m (... --> self) { | |
... | |
} | |
multi method m (... --> SELF) { | |
... # body is identical to body of the `--> self` method above. | |
} | |
This proposal is to support: | |
multi method m (... --> self), | |
multi method m (... --> SELF) { | |
... # body is identical for both method signatures. | |
} | |
or something similar. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment