5 ms·
Oh God, they just compared the speed of Objective C, Swift and... Python! It's nice to see Swift being faster than Objective C, etc., but what has Python got to
by kunstmord 12y ago
Oh God, they just compared the speed of Objective C, Swift and... Python! It's nice to see Swift being faster than Objective C, etc., but what has Python got to do with coding native iOS/OS X apps? Of course it's going to fail at speed when compared to a static compiled language.
What a weird and pointless comparison, imo (I mean the inclusion of Python, seems so random to me).
- stcredzero 12y agoI mean the inclusion of Python, seems so random to me It's supposed to be a "mainstream" scripting language. Also, it's an easy way for them to get favorable numbers for their presentation.
- kunstmord 12y agoYes. But what has that got to do with writing native apps?
- stcredzero 12y agoIt has everything to do with modern languages with powerful features.
- mitchty 12y agoNothing. Don't look too far into it. They probably just used python as an example of something most people would know. Its probably the most known scripting language out there so why not use it. Besides ALL benchmarks are pointless, even when you have the source of the benchmarks and know what they ran on software/hardware wise.
- freehunter 12y agoOn the Ars liveblog, I didn't see any mention of Swift support for other platforms. Are we going to see Swift on Linux and Windows as well?
- stcredzero 12y agoSwift on the Server with some modern CSP flavored concurrency mechanisms would Rock! Then combine that with a Swift-like language that compiles to Javascript, and that language could take over the web.
- scj 12y agoI didn't either, but if not, my bet is that outside programmers will make an open source version (like Mono to C#).
- myko 12y agoAccording to one Apple developer who works on the project it will _likely_ be open sourced, though the developer says they don't know if that's true or not: http://forums.somethingawful.com/showthread.php?threadid=3639638#post430465353 http://forums.somethingawful.com/showthread.php?threadid=363...
- Alphasite_ 12y agoCould you post the message (or thread) somewhere? I think that post is paywalled.
- myko 12y agoSure, sorry - I'm not sure which SA threads are free and which require payment. This is the relevant bit: "Is this under NDA? No. Is this open source? Not yet. It probably will be, but I can't make promises. Right now, our repository still has a lot of history that we don't want to make public, and we have a lot of work to do before we release."
- Alphasite_ 12y agoThanks.
- apl 12y agoIt's neither weird nor pointless. They're going for something that is as comfortable to work with as modern dynamic languages, for something that eschews the cruft of ObjC. Python is simply a very popular representative for this type of language. Of course, it's an easy target. But I can see why they went for it.
- kunstmord 12y agoYeah, I kind of get it after some additional thought (and reading through the replies). Maybe I missed out on some detail (not watching the live video, just a text stream) – now that I've taken a look at the syntax, the comparison seems more valid. Still, comparing this to Javascript would've been more interesting (webapps, all that stuff).
- creativeembassy 12y agoApple pushed the speed of Javascript in the newest version of Safari, earlier in the keynote. They probably try not to complete with themselves.
- outworlder 12y agoRuntime speed is only tangentially related to the fact that they are compiled ahead of time or not. I guess the comparison with Python is that Swift code looks more like Python than C.
- ashearer 12y agoI can see a reason: it's gunning for the mindshare of the kind of developers who like the features in Python. But you're right that performing faster than Objective-C tells you what you need to know, and showing the Python comparison first was just showmanship. I would have been interested in a JavaScript comparison, which I'm sure we'll be seeing from third parties soon.
- istvanp 12y agoIt's a comparison of how fast they made a dynamically typed language. (Yes, Objective-C is considered dynamically typed as well.)
- octopus 12y agoSwift looks a lot like a scripting/dynamic programming language. For e.g. this is a complete Swift program: println("Hello") I think the idea was that Swift will be as easy to code as Python and faster than Objective-C.
- MichaelGG 12y agoDynamic has nothing to do with it. printfn "Hello" is a complete program in F#, too. There's no reason C#, Java, etc. can't have such things exposed, but they get so wrapped up in their boilerplate and OO overhead they choose not to.
- zenojevski 12y agoI think it's the most popular obj-c/cocoa binding.
- pornel 12y agoPerhaps because the syntax of Swift is so simple that it almost looks (and hopefully feels) like a scripting language? (type inference, no semicolons, automatically managed memory)
- rayiner 12y agoPython was mentioned in a "generic object sort" benchmark. It's likely that the purpose of that slide was to show that Swift is a lot faster even when dealing with dynamic dispatch.
- hrktb 12y agoI don't know much Python, but swift seems to be aiming more in that direction than ruby or js for instance. On the superficial level, the use of line breaks to separate statement (although ; can also be used), on the deeper level the is an accent on accessibility and no non sense behaviour, where other language might have made more compromises on readability for instance.