4 ms·
I don't see Swift used for anything outside of iOS development. I don't really think it has enough to offer over more neutral languages like Python or TypeScrip
by symlinkk 8y ago
I don't see Swift used for anything outside of iOS development. I don't really think it has enough to offer over more neutral languages like Python or TypeScript to make it worth the time of learning a new language. It's in a position similar to C# in my opinion.
- zmmmmm 8y agoMaybe over TypeScript but I would love it if Swift displaced Python. Python is ridiculously popular for some good reasons (the clarity of code that tends to come out of it) but a whole lot of bad ones - complete lack of an effective type system, no usable multithreading etc let novice developers write bad code lazily without really feeling bad and it still passes as good code ... it's effectively the PHP of this decade.
- sk0g 8y agoThis simply won't happen till Swift can interop with C, C++ and possibly even ASM, fluently. Even then, you need structure, data types, and actual foresight while writing code, which leaves out all the less CS/SE trained peeps, such as scientists. And Swift is never going to be better as a scripting language. Lua, Python, Bash etc all have a few things in common, and Swift would stand out like a sore thumb in that company.
- mwfunk 8y agoHow would you improve the existing C/C++ interopability in Swift? What needs to work that doesn't work right now?
- zmmmmm 8y agoYes, I agree completely. Indeed, I would say the same thing in reverse if Swift was taking over the world of scripting (a bit like how people propose Kotlin and Scala as scripting languages ...). Using those languages for interactive analysis & high level scripting is as bad an idea as using Python for building a complex application with large numbers of rich data structures.
- sk0g 8y ago> using Python for building a complex application with large numbers of rich data structures. Eh, you don't need to though. Python can be the glue for your tools, if you will. Writing the meaty parts can be done in C/++, while you glue everything together in Python, giving you the best of both performance and ease of writing.
- millstone 8y agoI don't understand; isn't Swift much better than Python at native interop? Swift can directly include and interpret C headers for example.
- sk0g 8y agoC yes, C++ no. I'd say C++ is way more commonly used as the common application logic, for cross-platform phone/ desktop apps, so this represents a significant roadblock.
- saagarjha 8y agoSwift can interoperate with most C code already.
- sk0g 8y agoIgnoring C++ and Assembly completely. C++ is more important than C, especially for Swift's use cases, like multi-platform phone and desktop apps, video games, etc.