Re: [swift-evolution] Access modifier blocks

2016-06-29 Thread Adrian Zubarev via swift-evolution
Feel free to move the further discussion into my thread with an enhanced mechanism called group. Thread link. --  Adrian Zubarev Sent with Airmail Am 19. Juni 2016 um 20:24:31, Raphaël Wach via swift-evolution (swift-evolution@swift.org) schrieb: Also, even if the sample code with the 3

Re: [swift-evolution] Access modifier blocks

2016-06-19 Thread Raphaël Wach via swift-evolution
Also, even if the sample code with the 3 extensions might looks ok, think that if you’re working on a 300 classes project, declaring 900 extensions seems a crazy thing to do. I would not have to do this on a big project. @Charlie: Agree with you, on second thought, the implication of extending

Re: [swift-evolution] Access modifier blocks

2016-06-14 Thread Charlie Monroe via swift-evolution
Your approach has a major flaw: methods from extensions can't be overridden (at least for now). As long as you want to your controller to be subclassed and allow overriding your public/internal methods, you need to move them from extensions to the main class scope. Which simply sucks and may be

Re: [swift-evolution] Access modifier blocks

2016-06-14 Thread Ross O'Brien via swift-evolution
Your style may vary, but in my experience the access level of two functions has very little effect on how they should be grouped. Let's take an example: a class with two init functions. (If you want a concrete example: a subclass of UIView has init(frame) and init(coder)). While the inits take

Re: [swift-evolution] Access modifier blocks

2016-06-14 Thread David Hart via swift-evolution
And if you want to be able to declare properties in extensions, which I'm not a fan of, I think it would still be more a appropriate proposal than one that adds another way to group access modifiers. > On 14 Jun 2016, at 13:18, David Hart via swift-evolution >

Re: [swift-evolution] Access modifier blocks

2016-06-14 Thread David Hart via swift-evolution
I dont agree. I think extensions serve this purpose very well. Here is what I do: I start with the type declaration only containing properties (public or private). I then create one extension per access level required and one per protocol conformance and per superclass overrides. We get:

Re: [swift-evolution] Access modifier blocks

2016-06-13 Thread Raphaël Wach via swift-evolution
Yes, extensions serve a different purposes. It doesn’t seem right for me to just split every class content into 3 different extensions only to group together items with a similar access level. It would just make the codebase of a framework more messy. Access modifier block allows to not break

Re: [swift-evolution] Access modifier blocks

2016-06-13 Thread Charlie Monroe via swift-evolution
Extensions can't have stored properties. > On Jun 13, 2016, at 9:59 AM, Robert Widmann via swift-evolution > wrote: > > What does this do that breaking a structure down into local extensions with > the appropriate level of access control doesn't? > > ~Robert

Re: [swift-evolution] Access modifier blocks

2016-06-13 Thread Robert Widmann via swift-evolution
What does this do that breaking a structure down into local extensions with the appropriate level of access control doesn't? ~Robert Widmann 2016/06/13 0:55、Raphaël Wach via swift-evolution のメッセージ: > Hello Swifters, > > While working on some framework programming,

[swift-evolution] Access modifier blocks

2016-06-13 Thread Raphaël Wach via swift-evolution
Hello Swifters, While working on some framework programming, I had this idea that I would like to share with you. If some other people like it, I would be more than happy to write a proposal. Here is a little draft I wrote as a starting point to discuss. Sorry if there is mistakes, I am not an