I still thing that the naming is one of the hardest parts:
Imho "@super" just feels wrong — the word has already a meaning, and it should
only be used when referring to the parent class (here, it is a restriction/hint
for subclasses).
The best I can think of would be @extend (because it is about extension of the
marked method)
I definitely support the idea in general, so I've something to add:
— There are already cases where super shouldn't be called (never?)
— Imho before and after only make sense if the call to super is generated
automatically when it is omitted: The restriction on the order afaics offers
very little (if any) additional safety, and it isn't clear how defer would
interact with before.
Some questions that should imho be addressed in a formal proposal:
What about parameters and return values? Should it be possible to change those?
I think so, but that would make the feature more dangerous than pure
monitoring. If it's forbidden to change anything, we loose flexibility, and if
it's configurable, complexity is raised.
- Tino
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution