Simpler class instantiation #440
Labels
A-framework
Affects the framework crates and the translator for them
enhancement
New feature or request
help wanted
Extra attention is needed
Milestone
Swift decided to combine allocation and initialization, such that you can simply call
NSView.init()
instead of Objective-C's cumbersome[[NSView alloc] init]
. Actually,NSView.alloc()
is entirely impossible!For us, this means:
NSView::initWithFrame(mtm, frame)
(or(frame, mtm)
, depending on what we decide in The deal with mutability #265) instead ofNSView::initWithFrame(mtm.alloc(), frame)
.NSString::initWithString(string)
instead ofNSString::initWithString(NSString::alloc(), string)
.Should we do this? What would be the downsides? And how should this tie into our naming scheme in #284, since Rust prefers the name
new
?Relates a bit to #438, since we would like the syntax for declaring initializers to resemble the syntax actually used when calling them.
The text was updated successfully, but these errors were encountered: