News for hackers. Stuff that matters.
Re:Swift Proposal: Move Function by saghm on Thursday July 28, 2022 @01:10PM (#32267247)
Honestly, it seems like the association with iOS (or more precisely, the requirement for smooth interop with Objective-C) is what held back Swift from those other goals. I admit that I don't really have any Swift experience personally, but from my conversations with people who have tried to use it for non-iOS purposes, a lot of the pain seems to come from that fact that Swift kind of has this mix of fresh new ideas along with some unfortunate compromises for compatibility. There's a lot of support for more functional paradigms, and yet there's still OO/inheritance, presumably for interop with Objective-C; there are more modern string types, and yet sometimes you have to deal with NSString; there are ways of dealing with errors and optionals functionally, and yet there's still nil and exceptions. I recognize that a lot of people prefer OO and exceptions, but I think having to support both more traditional paradigms and more current popular trends watered down the language a bit and added friction to learning what otherwise could have been a much more streamlined alternative to C++. That said, it's also possible that no first-class support for Linux due to a lot of the innovative stuff going on in the language being tied to the Apple ecosystem could have been enough to stop it from mass adoption, but I can't imagine that it would have had to care so much about Objective-C interop without the Apple ecosystem tie-in, so it's hard for me to reason about whether having the dual paradigm stuff without the Apple tie-in would have been enough to hamper it.

There are no comments on this comment yet.