Hacker News new | ask | show | jobs
by 9935c101ab17a66 3447 days ago
Can you explain why you call into question the reliability of the Swift LLVM compiler?
2 comments

It would be apparent if you were a regular user of the compiler. Random crashes while compiling well-formed code and performance problems with larger files/projects are quite common.

Still, I would say it's mostly usable now. It used to be a lot worse.

You find it better than before? I find that Swift 3.+ is drastically worse than Swift 2.
Do you use Swift at all?

-edit- I meant it as a serious question. But the person who responded to me sums up the issues.

This is downvoted presumably for lack of information, but it's pretty much true.

The Swift compiler segfaults very frequently. I do find this amusing in that it's the compiler for a theoretically largely-memory-safe language (yes the compiler is written in C++, it's still funny). The syntax highlighter in Xcode, which is driven by the same stuff, also crashes, which breaks autocompletion and even indentation. Using Xcode, you just have to get used to it. It frequently reports the wrong error message - just something that isn't even close to related. Sometimes object files just become 0 bytes and you either need to clean (and experience the Swift compiler's blazing performance again) or go and modify that file so that the incremental compiler will pick it up.

I've found most of these to be triggered by using a lot of closures and possibly type inference. Shaking out the incorrect errors or segfaults is... not fun.

The most annoying one is the incremental compiler is broken under Xcode 8, leading to full recompiles every time a line of code is modified.

https://forums.developer.apple.com/thread/62737?start=0&tsta...

Oh? I meant it as a srs question. I wasn't sure what parts I should include. But thanks for essentially saying most of it.

I should mention I also find the community to be sorta toxic. They are so focused on Swift being the one language to rule them all and they use terms like "Swifty".

All language communities do that.
I get your point, programming language communities all have a certain level of fan-boyism. However I find Swift's community to be particularly abhorrent. I stopped partcipating when people started to ask if certain codes is "Swifty" and people would judge the merit of something on whether its "Swifty". It also got tiring with how militant they were with other programming languages, especially Java.
Yes I can agree with these.

I wonder if we'll have refactoring in Xcode for C++ now Lattner has gone. I wonder why they never added it.