17 ms·
I think most languages thatare popular today are 'best of most worlds' for their users. For example, Scala has all the features you specified and has an even la
by sacheendra 10y ago
I think most languages thatare popular today are 'best of most worlds' for their users. For example, Scala has all the features you specified and has an even larger ecosystem of libraries for the server side.
I am still happy that this has been done as I know having a common API to program against does ease development and creates a great ecosystem as evidenced by node.JS.
- tormeh 10y agoSwift was influenced by Scala, so that's no surprise.
- desdiv 10y agoObligatory comparison: https://leverich.github.io/swiftislikescala/ https://leverich.github.io/swiftislikescala/
- tormeh 10y agoWow. They're basically identical. Scala has a bit less boilerplate sometimes, but it's also older, so I guess Swift will get syntactical sugar to catch up in time.
- melling 10y agoNo, it's a lot like Groovy: http://glaforge.appspot.com/article/apple-s-swift-programming-language-inspired-by-groovy http://glaforge.appspot.com/article/apple-s-swift-programmin... No, it's a lot like C#: http://swiftcomparsion.qiniudn.com http://swiftcomparsion.qiniudn.com
- vorg 10y agoNeither Scala nor Apache Groovy are listed in the 8 languages Swift was influenced by on its Wikipedia page. That Groovy link was written by the Apache's Groovy PMC chairperson, and is more wishful thinking that fact.
- melling 10y agoYeah, I already knew what Wikipedia said. My point was that a lot of languages look similar. Scala might have influenced Swift. Zip you go to the author's blog, he says lists those languages and says many more that he doesn't name: http://nondot.org/sabre/ http://nondot.org/sabre/
- chris_7 10y agoSome of these comparisons aren't great. The "Variable Number Of Arguments" example is better expressed in Swift with "reduce", and it's really comparing "summing an array", the varargs aspect is a minor detail of the example. The "Idiomatic Scala" example doesn't even declare a function with varargs! (yes, it uses one, but that's not really the point) The Swift function in the protocols example doesn't need to be generic, as the protocol doesn't have any associated types, and really ought to be a protocol extension regardless.
- yvsong 10y agoThe comparison should be updated to Swift 3. Swift syntax is more intuitive and readable than Scala. A common mistake in language design is to depart from C syntax, without substantial gain. For example, replacing {}, &&, || with other things. Swift strikes a great balance between intuition and innovation.
- premium-concern 10y ago> Swift syntax is more intuitive and readable than Scala Example?
- manojlds 10y agoAnd scala doesn't have {}, &&, || ?
- Cyph0n 10y agoOne benefit Swift has over Scala is that it compiles down to LLVM and is statically linked. I still love Scala though, hands-down my favorite language to work with.
- paulddraper 10y agoScala compiles to LLVM too. https://github.com/scala-native/scala-native https://github.com/scala-native/scala-native Though it's experimental (and will likely remain that way for a while).
- erichocean 10y agoWoah! That's badass. :)
- Cyph0n 10y agoI am aware of that, but it's not a fair comparison.
- paulddraper 10y agoAlso, most Scala deployments are "statically linked", i.e. all JAR/class files are together.
- Cyph0n 10y agoYes, but you need to bundle a JRE and the Scala library (~5 MB).
- trevor-e 10y agoI don't know a whole lot about any of this, but isn't Swift's library bundled with iOS apps? Or is that for a different purpose, such as iOS being able to run apps that target different versions of Swift?
- 10y ago
- hota_mazi 10y agoThe problem with Scala is not that it has all the features of Swift, it's that it has way more. Scala developers see this as an advantage, everybody else sees that as a liability. Swift and Kotin manage to capture the perfect amount of "a few new features but not too many" of all languages I've played with these past ten years. They are both the perfect example of languages that hit the right compromise in many dimensions.
- threeseed 10y agoI am terrified of working with experienced Scala developers. The code they write is less about implementing some business functionality in the most elegant way possible. But rather it's an exercise in who can use the most obscure parts of the language. And unfortunately there are far too many obscure parts.
- premium-concern 10y agoI have never seen this.
- threeseed 10y agoThe levels of enlightenment: http://www.scala-lang.org/old/node/8610 http://www.scala-lang.org/old/node/8610 Most Scala developers are in the A bracket. The experts are in the L. The code written by either is so different they could almost be different languages. You don't get this sort of split in Swift, Java etc.
- premium-concern 10y agoThis is more of a split between techniques for programming-in-the-small vs. programming-in-the-large. All languages have this. You could write more or less the same list for Swift or Java with minimal changes. Again, do you have any actual experience with this, or is this just your assumption? Because I have never seen this issue in the wild.