‘Fake error’ about immutable values when using popFirst() on Array

It’s been a while since I wrote any meaningful Swift.  How I didn’t miss the Swift compiler’s bullshit error messages. var someArray = [“Foo”, “Bar”] if let foo = someArray.popFirst() {     print(“Who cares, we never get here anyway.”) } That yields, on the popFirst() method:  “Cannot use mutating member on immutable value: ‘someArray’ is … Read more

Stupid Swift error message #a bajillion and one

Input code: let componentsOfPotentialInterest = [Calendar.Component: ((Int) -> String)]( .day: { String($0 + 1) }, ) Push button.  Expect results (or at least bacon).  Get: Foo.swift:76:21: error: expected ‘,’ separator .day: { String($0 + 1) }, ^ , Foo.swift:76:21: error: expected expression in list of expressions .day: { String($0 + 1) }, ^ Foo.swift:76:21: error: … Read more

ambiguous reference to member ‘joined()’

You can readily tell that Swift was created by a C++ fanatic, by its fucking obtuse error messages. ⤹ Me             Swift compiler ⤵︎ In today’s episode of “what the fuck do you want, compiler?”, we tackle: foo.swift:186:39: error: ambiguous reference to member ‘joined()’ log.debug(“\(thingies.joined(separator: “, “))”) ^~~~~~~~ Swift.BidirectionalCollection:27:17: note: found this … Read more