8 ms·
I will surely be downvoted for speaking so off the cuff, but I haven't really enjoyed swift so far. How has the general developer reception been to the languag
by dmritard96 11y ago
I will surely be downvoted for speaking so off the cuff, but I haven't really enjoyed swift so far. How has the general developer reception been to the language, not just with respect to obj-c, but also to java or any other turing complete language?
- chc 11y agoYou'd probably get more upvotes if you didn't start out by complaining about hypothetical downvotes.
- indians_pro 11y agohe is stating what he believes will be true. i didn't read a complaint anywhere. in fact, i think he was implying how sure he was about his folliwing statments, as he was ready to post them inspite of the (expected) downvotes. expected things are, by their very nature, hypothetical until they come true or are proven false.
- narsil 11y agoI've seen the opposite be true most of the time (and I have showdead on)
- epmatsw 11y agoI enjoyed it well enough. Didn't feel quite mature (refactoring tools, error handling, etc) and optionals are still a little frustrating, but it definitely feels like it has potential.
- charlesdm 11y agoWhat I personally dislike about Swift is the change in mental context when dealing with the combination of C/C++ and Swift code. Plenty of nontrivial apps use significant amounts of C and/or C++ libraries in some way. The switch when dealing with a combination of C/C++ and Objective-C source was not really a problem. But trying to interface a C++ library into a Swift application is less than a fun experience. Personally, while the language is fresh and seems pretty good (it has some great additions), I still prefer Objective-C. I guess I'm waiting for better integration with existing libraries.
- dvanduzer 11y agoDo you have any notes on this experience posted somewhere publicly? I'd love to see an overview of the issues between Swift and C++ libraries. (Boost? Not Boost? The nuances of Swift's type system?)
- MrGando 11y agoYou can't communicate between Swift and C++ right now... it's on their bucket list though :)
- fleitz 11y agoSwift as a language is pretty great, however, the tooling and obj-c interop make it a pain in the ass. It's hard to realize most of the performance benefits when everything you're interacting with requires objc_msgsend or uses NSArray / NSDictionary. As well, it's far less 'scripty' than Obj-c. The type system in swift really leaves something to be desired in terms of typing types. The point of Obj-C was kind of to avoid writing the kinds of apps where a great type system would really shine, swift lets you build those kind of apps, but in my opinion most of the time we shouldn't be building them. Your project probably doesn't need 1,000 developers on it who need solid interfaces and type checking to make sure that everything is going according to the UML diagram. It probably needs 2 or 3 developers who talk to each other, add asserts to their code, and a type system thats a little forgiving. ObjC is a language that has everything you really really need, and left out the 1 thing you kinda wanted in exchange for leaving out the thousand 1 little things that everyone else wanted too. Like for example exceptions, sure they're there, but it's not idiomatic and when you program without them you realize what a crappy idea they were in practice. In day to day coding NSError is 1000x better than exceptions.
- the_af 11y ago> The point of Obj-C was kind of to avoid writing the kinds of apps where a great type system would really shine, swift lets you build those kind of apps, but in my opinion most of the time we shouldn't be building them. Can you clarify this? What is the kind of apps where a "type system would really shine"? How can you avoid writing them?
- chowells 11y agoType systems really shine in apps that you maintain. You avoid writing them by writing shovelware that intends to extract the maximum amount of money in a short term and be replaced by something else in the long term. I don't think that's really what Obj-C was designed for.
- fleitz 11y agoApps that have a lot of YAGNI features. eg. For some reason your app has the ability to use Postgres instead of SQLite, even though you always use SQLite. eg. For some reason your app supports Postgres/MYSQL/SQL Server because every enterprise you sell to wants to run their preferred database instead of the one that works best with your product. In short 'enterprise' apps.
- deleted 11y ago[deleted]
- fixermark 11y agoSwift's popularity has undergone a meteoric rise for a young language according to TIOBE [http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....] But that's not surprising given its ecosystem; as others have mentioned, language success has less to do about its theoretical benefits and more to do about what environments it allows the developer access to. Javascript is the case-in-point; I think few people would argue it is a well-designed language, but if you want to do web development, you're going to need at least a basic understanding of it, so it maintains brutal popularity.
- beefsack 11y agoGiven the context it's used in, this is hardly surprising.
- datashovel 11y agoThe shocking thing I think isn't how fast Swift has grown, but how fast Objective-C has fallen. The stats from that site don't appear to show that Swift has made up for that. The overall combination of Swift and Objective-C in those numbers make me believe Apple's decision to make Swift open source is less about goodwill, and more about stopping the bleeding.
- untog 11y agoIt's better than Objective C, so I like it. But if iOS was open to every language I doubt people would be paying much attention to it.
- Tloewald 11y agoYeah it's only possible to write iOS apps with C, C++, C#, Ruby, Javascript, Python, LUA...
- untog 11y agoNot with first-class support is isn't.
- coldtea 11y agoSo? Is there any platform that has first class support for more than 1-2 languages?
- djur 11y agoUnix. The 'native' language there is C but there are dozens of languages that are well-supported. They can interoperate through OS-level abstractions like pipes and via C APIs on at the process level. The average Unix desktop or server is probably running code written in 5-10 languages, more or less transparently to the user.
- coldtea 11y agoFirst, you said with first class support from the vendor. Linux doesn't offer that for any language. Second, that's not an app development platform. Gnome has C (and it's own unholy stack on top), KDE has C++. You can code for OS X/iOS in all kinds of languages too, if you mean at the OS and not at the app development level.
- djur 11y ago
- AlwaysBCoding 11y agoI think it's terrible. Parsing a JSON response into a Swift object takes a full-day to figure out when it's literally just JSON.parse(response) in any other language. You can't pass immutable structures (structs) into NSNotifications and I can't figure out why. It's confusing and poorly documented, and a complete chore to use. React Native is a godsend.
- coldtea 11y ago>Parsing a JSON response into a Swift object takes a full-day to figure out when it's literally just JSON.parse(response) in any other language. Something which has nothing to do with the language. Here's how you do it with a popular Swift lib: let json = JSON(data: response) if let userName = json[0]["user"]["name"].string{ .... }
- chc 11y agoEh, the awful state of their respective standard libraries seems to come up quite a bit when people are critiquing OCaml or D.
- matthewmacleod 11y agoWhat on earth are you talking about? Parsing a JSON response in Swift is basically the same as it is in Objective C: let parsed: AnyObject? = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments, error:&parseError)
- zenocon 11y agoThis is truly not meant to be a snarky comment, but why is it so overtly verbose? I left Java years ago b/c it was making my fingers arthritic it seems. It doesn't look like much fun. Sure, IDEs do autocomplete, but still requires parsing by the human eye. I'm sure you get used to it. Every language looks horrible the first time, then you learn to live with it and maybe love it, but on first glance that looks pretty awful.
- carlosrg 11y ago> I haven't really enjoyed swift so far I haven't either, but I haven't used it a lot so I can't give a final verdict on it. But I'm the kind of person that enjoys C++ (well, especially after C++11, feels like a new language and I'm slowly becoming a C++ fanboy), and I guess all those new system languages like Swift and Rust are supposed to fill the void for people that don't like the existing system languages available, so maybe it's not for me.
- s73v3r 11y agoI find it far less frustrating to use than Java, as it actually has decent generics.
- rmrfrmrf 11y agoI love it. It's a gateway drug to functional programming, and "doing" functional programming, in turn, helps me write more expressive Swift code. It's still rough around the edges, but it's a beautiful language that's a joy to use.