Re: [swift-users] Coding style for internal/private variables

2016-06-01 Thread Adrian Zubarev via swift-users
A little bit off-topic: Is there any way to create autocompletion shortcuts in Xcode that will show only private, internal or both values of an instance? class Foo { private var integer: Int = 0 internal var string: String = "foo" internal func boo() {} } let instance = Foo()

Re: [swift-users] Coding style for internal/private variables

2016-06-01 Thread Tino Heth via swift-users
I never liked the underscores (so for me, they have been the best choice to mark stuff I should not know of in Cocoa ;-). For several years, I prefixed instance variables with "m", but stopped doing so after a talk about bad habits in writing Java code: It is like Hungarian notation, which also

[swift-users] Coding style for internal/private variables

2016-06-01 Thread Adrian Zubarev via swift-users
I’d like to talk about your personal coding styles in swift for its access control. Remember these variable names like __magic or _spell or even garbage_? Sure swift solves the synthesize problem but there might be old habits that let us write such code. Here are some examples: internal