Forwarding your message to the right thread.

Please use this subject pattern when replying to something:

Re: + [swift-listname] + Topic name

As for the current thread:

Re: [swift-evolution] Proposal: Allow "flat" declaration of nested types

Best regards,



-- 
Adrian Zubarev
Sent with Airmail

Am 20. November 2016 um 20:25:50, Zach Wolfe via swift-evolution 
([email protected]) schrieb:

+14689 on this one. I'm working on a project right now where I have a 
significant amount of subtypes inside one of my types (gameboy emulator, 
creating abstractions on the io registers to make them more pleasant to deal 
with) and I have the subtypes split up into a bunch of files. With current 
syntax, all of these files are forced to adhere to the following pattern:
extension IORegisters {
struct X { body }
}

With this proposal, all of these files could be unindented to the left like so 
(and would arguably be more clear):
struct IORegister.X { body }

I'm in favour of allowing methods and computed properties to be declared in 
this way as well:
func A.doSomething() {}
var A.computedProperty: B {}

I also agree with the notion that this proposal should be viewed as syntactic 
sugar - a short-form way of writing extensions, nothing more - and as such 
should not have any weird semantic differences from them.

Also, this is my first reply on this list, hi everyone!
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to