That's just part of the charm of living on the bleeding edge of development. You've fixed or bypassed all your AutoDiff compiler crashers, only to spend hours investigating another crash that's in another aspect of the compiler. The ratio of unique compiler crashers I've reported to the amount that I've seen fixed is pretty dismal (10:1). This is why you have the privilege of learning SIL, C++, LLVM, and spendings days of your own precious time fixing one compiler crasher impacting your project.
This is obviously sarcastic, but it highlights a possibly underemphasized issue. Could we compare the compiler's crashiness to other languages like Rust and Julia?
10 crashers found in 54 days. 0 of them have been fixed. But in all seriousness, I am not fixing them because my priorities lie elsewhere. Just narrowing/reporting them (takes hours each time) is doing my due diligence and responsibility for the sake of the compiler.
Edit: Also, in the first bug I mentioned, the compiler froze my computer and I had to reboot it. This is a 2021 M1 Max MacBook, so it’s a pretty stable computer.
Even better - had I not accidentally deleted a line before committing something to GitHub and compiling it on a cloud computer, I would have never discovered the bug! Who knows how many unique bugs exist with the capability of shutting down your computer? 10? 100? 1000? Is it an anomaly of combinatorics?
Interesting. I wish I could type more commas. Seriously. In arrays, one can:
let array = [
But in if or guard statements (or parameter lists), one cannot:
if let f = foo,
let b = bar,
Accepting the extra comma is useful when you're working with long lists of these items arranged vertically, and you're rearranging or adding or copy/pasting, or the code is being generated by something.
I've always liked the idea of commas working like semicolons do in Swift, which means you'd both be able to drop some commas which are currently required and add some commas in places they're currently forbidden. I have not attempted to investigate if this is actually plausibly doable in Swift's syntax, though.
ah, i see, the trailing comma for if-statements aren't possible...
yea im ok with that too, its less incongruous for sure, just wish commas could be a little like semicolons and be optional where they aren't strictly needed...
on that note too, i kind of wish swift (or perhaps the language server?) had syntax auto-fix so i can stop using annoying (bolt-on) build scripts like swiftlint that blow away my undo stack every time they run... id much prefer these fixes would be built-in to swift itselfand autocorrect my syntax as i type...