Also hoping someone more knowledgeable can explain why these seemingly
simple cases do in fact take so long! :)

Matt Gallagher wrote an excellent article where he explained how seemingly simple expressions can sometimes cause an enormous amount of work for the type checker because it has so many overloads to consider:

  "Exponential time complexity in the Swift type checker"
  http://www.cocoawithlove.com/blog/2016/07/12/type-checker-issues.html

It's a great read.

For what it's worth, on my Mac with Xcode 8b6 the snippet takes about 3 seconds to compile (which is still a long time).

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

Reply via email to