On March 23, 2017 at 12:32:38 PM, Brent Royal-Gordon (br...@architechies.com) 
wrote:

To what extent could your need for safety be satisfied by (a) giving the 
property a long, unique name like `unsafeUnsynchronizedT`, and (b) writing a 
very small unit test/shell script/Perl script which makes sure references to 
that very unique name only appear between the two "MARK:" comments?
A third-party linter to get a scoped feature is our current candidate for 
reimplementing this feature if it's dropped from Swift.

However, I think it's worth asking to what extent it makes sense to build a 
language that gets fixed with linters.  For example Swift could have used a 
linter for typechecking (Python is doing this) but the benefits of compile-time 
typechecking affect a large number of programs and so we decided to ship with 
batteries included.

The scoped visibility is like the type system.  It is a compile-time check that 
is used to catch threading, information disclosure, encapsulation violation, or 
similar bugs.  These are problems that affect a large number of programs, we 
should ship with batteries included.

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to