News for hackers. Stuff that matters.
Re:Mixing Swift and C++ by jwells89 on Sunday July 23, 2023 @04:14PM (#36839338)
This used to irritate me, but now that I'm in the habit of breaking functions up I've come to prefer it. It makes for code that's easier for myself to read and follow further down the road, which I think is a reasonable proxy for readability by others.
Re:Mixing Swift and C++ by cachvico on Sunday July 23, 2023 @04:32PM (#36839523)
Writing modular code is good but that's a ridiculous reason to need to do so.

Xcode also trips on simple type errors and sometimes fails to even provide a line number where the error lies. As someone who just wrote a Swift app after no prior exposure, it's oddly immature in some basic ways after nearly a decade from launch.

Re:Mixing Swift and C++ by jwells89 on Sunday July 23, 2023 @04:46PM (#36839657)
Yeah I won’t defend it too much, Xcode/SourceKit/etc are clearly written in a way that assumes devs are writing perfectly idiomatic, smell-free code which isn’t very aligned with reality. I’ve more or less got a feel for what makes it grumpy so I don’t trip it up too often any more but it’s annoying on the odd occasion I do.
Re:Mixing Swift and C++ by cvwright on Monday July 24, 2023 @08:47AM (#36847114)
Yeah this is a major pet peeve. Especially when the compiler crashes. Growing up writing in C, I didn’t even know that was a thing.