Open
Description
List of improvements that would bring us closer to feature-parity with Swift:
- The ability to safely call superclass methods inside
declare_class!
(though it's probably not safe to do so outside): Calling super methods safely #455 - Easier
init
method declaration:declare_class!
: Safer initializers #438 - Allow calling declared methods directly (e.g. without having to duplicate them in
extern_methods!
). - Automatically generate ivar names.
- Automatically generate helper-module name.
- Require protocol implementors to have a certain mutability (e.g.
NSWindowDelegate
should requireIsRetainable
, or perhaps evenMainThreadOnly
).- Partly done in Fix main thread requirements on protocols #509, fully done by Consider removing (non-interior) mutability? #563.
- Store data about methods from virtual protocols in a
const
to allow safety-checking them as well. - Allow class methods access to the actual class it was invoked with. Swift solves this with
self
, could we solve it with an extra argument and perhaps a special attribute on that argument? - Allow implementing protocol methods without having to specify the selector.
- ...