‘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 immutable”.

No it’s not.  It’s simply not.

For whatever reason, if you instead call popFirst() on ArraySlice – ostensibly indistinguishable from a real Array – it works just fine.

var someArray = ["Foo", "Bar"][0...]

if let foo = someArray.popFirst() {
    print("Yet this works correctly.")


I presume it’s trying to tell me something stupidly obscure about Swift’s byzantine type system.  Good luck finding out what.  Good luck even finding the definition of the popFirst() method, since Xcode claims it doesn’t exist if you Command-Control-click on it.  But Xcode can’t find most things, so that in itself says very little.

iMac Pro vs 2014 Retina iMac in Civilization VI

I was intending to do a full comparison between the two – charts and all – until I discovered that the performance is almost identical. Which is quite disappointing, since the Vega64 in the 10-core iMac Pro is dramatically faster than the Radeon R9 M295X in the 2014 Retina iMac.

On maximum settings – 2560×1440 Ultra with 8x MSAA – both machines average about 20 FPS in the built-in graphics benchmark.  And the AI benchmark yields similarly indistinguishable results, with average turn times of about 23 seconds.

With VSync off there’s maybe a very small increase in frame rate – closer to 24 FPS, than 20 FPS, but it’s visually indistinguishable to me.

And that’s despite the iMac Pro having, in addition to the beefier CPU & GPU, use of its very fast built-in flash storage, vs a regular SATA SSD on the 2014 Retina iMac.  Load times were noticeably faster, but only in the 10-25% range perhaps – nice, but not impressive all things considered.

In actual gameplay, I did feel like the iMac Pro offered a smoother experience overall – maybe not higher average frame rates, but fewer stutters or skips.  Hard to say, though, if that’s a real effect or just a misimpression.

So, definitely don’t buy an iMac Pro for playing Civilization VI – any iMac from the past four years will be just as good, sadly.  Whatever Civilization VI is bottlenecked on, it’s clearly not the CPU throughtput, GPU anything, storage anything, or memory anything.  Which I guess just leaves CPU single-threaded performance. 😞