I'm not too experienced in Swift, I am Obj-C, but from time to time I need too mess with Swift as well. I know in Java for example it is useful for listeners, still may not be a best practice. So what about Swift? My common sense tells me it is anti-pattern, in general. It could be useful for "quick development".
Asked
Active
Viewed 106 times
0
-
1it is helpful during e.g. creating namespaces in your project or encapsulating dependencies – evaluating whether it is a good or bad idea highly depends on the context. – holex May 01 '19 at 15:02
-
@Dávid Pásztor - this referenced "answer" was not offered by stackoverflow in the search, obviously I have looked for duplicates... besides this it also does not answer the question, as by me, this question should be reopened. – Nikita May 01 '19 at 15:36
-
1@Nikita It is very useful. Some examples of nested structure in the language https://developer.apple.com/documentation/swift/string/index, https://developer.apple.com/documentation/swift/string/encoding, https://developer.apple.com/documentation/swift/string/compareoptions and many others. Note that when referencing them locally you can omit the parent type – Leo Dabus May 01 '19 at 16:00