Re:Swift type checking is undecidable
by dacodanelson on Tuesday August 04, 2020 @03:05AM
(#24047452)
I haven't had time to go over this as more than a cursory glance, but I'm intrigued. Swift holds a weird place in my estimation between making coding more accessible and making programming an exercise in futility; oversimplifying to the point of being incorrect, essentially. I look forward to enjoying this with my morning coffee.
[ Parent
| on HN ]
I too had this opinion of it from starting to read a (now out-of-date) book on Swift and Cocoa. It seemed some of the decisions eg. no fall-through for switch statements were done to reduce the possibility of bugs but just made it more irritating. I don't know if the language has changed in this regard though.
I always thought C# was the meeting place between Visual Basic and C++, where it was familiar enough to both language users to migrate, although occasionally different enough to cause problems (eg. generics vs templates). I don't know what Swift is "related to" in this regard - any ideas?
Of course, my lack of knowledge about Swift may show me up here so I am happy to be corrected and educated. This was merely an observation.
The Swift discussion in the article is very good and logically laid out.
Swift has explicit fall through nowadays (https://docs.swift.org/swift-book/LanguageGuide/ControlFlow....)
I think it has had it for quite a while, but I can’t easily find when it was introduced.