[swift-evolution] [Post Swift 3] [Proposal] Introducing `group` mechanism

L. Mihalkovic laurent.mihalkovic at gmail.com
Thu Jun 30 00:13:13 CDT 2016


Comparing with c++ is interesting... Do you remember that when u look at the implementation, the modifier is on every single method, so that when looking at a single page of code u do not have to go far to be reminded of the signature of what you are modifying... additionally, because the impl is separate, the code does not have to float 2 tabs away fromthe left margin (not to mention that in c++ we tend to favor 2 spaces indentations). Altogether the c++ has a more viable set of compromises than this proposal offers.
Regards
(From mobile)

> On Jun 29, 2016, at 11:41 PM, David Sweeris via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Speaking of C++, is the “group” keyword even necessary? To borrow your own example from earlier, it seems like we could just as easily say this:
> public struct A {
>     public { // all public
>         func member1() {}
>         func member2() {}
>         func member3() {}
>     }
>     public labelName {// all public, accessible under `foo.lableName`
>         func member4() {}
>         func member5() {}
>         func member6() {}
>     }
> }
> (which is not C++’s syntax, I know… the comment just got me thinking about it is all)
> 
> - Dave Sweeris
> 
>> On Jun 29, 2016, at 1:03 PM, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> Looking at how c++ has a similar access modifier indent mechanism I’m still wondering if you’d argue about scrolling there.
>> 
>> with no assistance to find where it is
>> An assistant isn’t something the language solves for you. This is a different talk about the IDE. Grab some stdlib or foundation code and look at the filename and the code inside the file. The file might not contain only a single type equal to the filename. Also if there is another huge type present and you have a small display and currently looking at some specific member in the middle of that that type, which assistance have to find out the type of that member? Here we go again: you’re own assistant will your own negative argument ‘scrolling’.
>> 
>> 
>> 
>> 
>> -- 
>> Adrian Zubarev
>> Sent with Airmail
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160630/e9e2037f/attachment.html>


More information about the swift-evolution mailing list