Live data from Hacker News

The Swift Programming Language

developer.apple.com

281–290 of 970 posts

Re: The Swift Programming Language

#281

So it looks like the language isn't open source and won't target non-Apple runtimes? I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.

Combine this with their OpenGL replacement ("Metal") and that pretty much kills any cross-platform at all doesn't it?

It's not too hard to write a graphic engine that abstracts out the graphics API, but it would have to be done in a language other than Swift...

Re: The Swift Programming Language

#282

Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";

You say "Apple syntactic craziness", but "var" is identical to JS, et. al. and "let" is identical to ML, et. al. The string interpolation syntax is unique, but kind of makes since given then \ is the escape character in C strings.

"let" is JavaScript as well.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: The Swift Programming Language

#287
post #165

Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";

Using the backslash+parens for interpolation is really clever! No more ambiguity like when using % or {}. Is that a Swift original syntax?

I think it makes it harder to read interpolated strings, I'm just so used to seeing % and {}.

Re: The Swift Programming Language

#288

So it looks like the language isn't open source and won't target non-Apple runtimes? I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.

Is there anything to stop a independent implementation? Like C#/.Net and Mono?

No point?

Re: The Swift Programming Language

#289
"The company says that Swift apps are significantly faster than Objective-C apps, outperforming them by over 93x."

With a graph showing ObjC at 127x faster than Python, Swift 220x faster than Python.

Thus the conclusion is 220 - 127, Swift is 93x faster than ObjC.

Someone needs to resit their GCSEs.

Re: The Swift Programming Language

#290
post #217

Earlier quoted context omitted.

I'm old enough to remember Apple suing Microsoft for "copying their look and feel". Open source is something Apple only does strategically - when they have to or it suits them - it is not part of the company's ethos. http://en.wikipedia.org/wiki/Apple_Computer,_Inc._v._Microso... .

Yeh, I agree. I was surprised when they open sourced webkit. But like you said, it's strategic. I don't think they care that much about the browser. Their emphasis is on apps running in their ecosystem.

They didn't have a choice about webkit; it was a fork of KHTML, which was a part of KDE (and available under the terms of the GPL).
Post reply on HN