My apologies up front if I am going about this incorrectly. I have been 
exploring extensions in Swift 3 both as a part of protocol-oriented programming 
and as a way to encapsulate related code to improve readability and 
maintainablity of otherwise more complex classes I have designed. I am able to 
encapsulate methods and calculated properties in extensions and restrict their 
use to the object type I am extending as long as everything is in one file via 
fileprivate.

I would like to be able to have my class or structure file in a directory that 
contains my associated extensions  (also in separate files) and be able to 
restrict the access  of appropriate properties and  methods to that common 
directory. This would allow the same level encapsulation as fileprivate with 
the benifit of being able to organize code into sepereate files based on 
function.

I did not see this in the commonly rejected list but am unsure if this is 
something that is out of scope for 4.0. Is this something I can write up a 
proposal for? Is there some other approach that I missed that I should be using 
instead?

Kind regards,
Jim Malak


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to