0

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".

Leo Dabus
  • 229,809
  • 59
  • 489
  • 571
Nikita
  • 1,811
  • 1
  • 20
  • 41
  • 1
    it 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

0 Answers0