‘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. That yields, on the popFirst() method: Cannot use mutating member on immutable value: ‘someArray’ is immutable. No it’s not.  It’s simply not. For whatever reason, if you instead call popFirst() on ArraySlice – ostensibly indistinguishable from… Read more

Stupid Swift error message #a bajillion and one

Input code: 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: expected ‘,’ separator .day: { String($0 + 1) }, ^ , Believe it or… Read more

ambiguous reference to member ‘joined()’

"What do you want" scene from The Notebook

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