Is it possible to adjust the class syntax so that the method keyword works with existing codes? #93
Replies: 4 comments 4 replies
-
I would also like to see some of what Corinna provides be available outside of Corinna, but not now. Corinna is already the biggest change to Perl since the release of Perl 5 in 1994. Given the size of the MVP, the PSC made it clear that they would not accept it in its current form due to the risks it presents. Thus, the MMVP was created. While the steering council is aware that some changes may need to be made to address unforeseen issues, expanding the scope of the MMVP (especially for an untested feature) is violating what the council requested. Sorry for that. Once the MMVP is released (maybe by 38?) and people can start playing around with it for a while, we'll have a better understanding of what our real needs are and we could potentially revisit this issue. |
Beta Was this translation helpful? Give feedback.
-
The title says "adjust the class syntax" - but actually this seems to suggest a change in Corinna behavior? I doubt this is a good idea. As a start, detection of a Also, this isn't sufficient: if (new_is_defined_in_current_class()) [
# Do nothing
} "Do nothing" in an I suggest that if authors want to use the keywords |
Beta Was this translation helpful? Give feedback.
-
I try another suggestion. 1. Is it possible to add a class attribute that can use the class and method syntax for existing codes using plain old hash reference? Examples of existing codes with the class syntax:
Harald said.
If such a CAPN module is added to core modules, I can understand your proposal from the perspective of fairness. |
Beta Was this translation helpful? Give feedback.
-
My first suggestion is related to the new method of the super class. @HaraldJoerg is afraid "The title says "adjust the class syntax" - but actually this seems to suggest a change in Corinna behavior?" And the I try another suggestion. Is it possible to adjust the class syntax so that the method keyword works with existing codes using more simple logic?This is not related to the new method of the super class. Examples of existing codes:
Examples of existing codes with the class syntax:
I'm glad this is OK (OK means this code works well and the redefine warning doesn't occur). A sample implementation is shown in pseudo code(this is an idea). It simply doesn't generate a new method if the new method was already defined.
Is it possible to adjust the class syntax so that the method keyword works with existing codes? Benefit The benefit is that all existing codes use the class syntax and the method syntax with a little fix. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to adjust the class syntax so that the method keyword works with existing codes?
Examples of existing codes:
Examples of existing codes with the class syntax:
I'm glad this is OK (OK means this code works well and the redefine warning doesn't occur).
A sample implementation is shown in pseudo code(this is an idea).
Is it possible to adjust the class syntax so that the method keyword works with existing codes?
Benefit
The benefit is that all existing codes use the class syntax and the method syntax with a little fix.
Beta Was this translation helpful? Give feedback.
All reactions