2

SwiftFormat: What is the reasoning behind andOperator rule? https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md#andOperator

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Luda
  • 7,282
  • 12
  • 79
  • 139
  • 2
    I do *not* consider that a useful rule. You need the comma if you combine optional binding with other boolean tests (see https://stackoverflow.com/q/35434939/1187415), but otherwise there is no reason for it. – Martin R Nov 10 '19 at 08:42
  • Here https://stackoverflow.com/a/56568171/1187415 is an example where there is a subtle difference, but I still do not see a reason to generally replace `&&` by a comma. – Martin R Nov 10 '19 at 08:50

0 Answers0