Live data from Hacker News

The Swift Programming Language

developer.apple.com

881–890 of 970 posts

Re: The Swift Programming Language

#881
post #560

Earlier quoted context omitted.

My dislike is that it uses [] for method calls. It's like making Objective-English where we swap Z and A and j for o, just for the hell of it. If thzt sjunds like fun tj yju, thzn gj fjr Jboective-C.

It's not for the hell of it. [ ] does not mean method call, it is the syntax for a message send. Objective-C is a super set of C, adding an Smalltalk like object system to C. The delimiters say "I am sending a message", which is different to a method call. Also, without them the language would be much more difficult to parse, and future changes to C could break the language. It's lasted well (first appeared in 1993).…

Thanks. Just read up on messaging and now I like it even less :(

In Smalltalk and Objective-C, the target of a message is resolved at runtime, with the receiving object itself interpreting the message. ... A consequence of this is that the message-passing system has no type checking.

http://en.wikipedia.org/wiki/Objective_c#Messages

Re: The Swift Programming Language

#882

Me (running arch linux): Oooh! I'd love to learn a new language. And great, they have a free ebook it looks like to describe it! Apple: To download Apple Inc.’s 'The Swift Programming Language', you need to have iTunes. Me: What? Apple: Using a 64-bit edition of Windows? On a Mac? Me: No. That experience just killed a potential programmer for you right there, Apple. I had a few hours to kill, and was pumped to jump o…

http://book.swiftlang.eu

Re: The Swift Programming Language

#883

Earlier quoted context omitted.

There is already MacRuby and RubyMotion. They tried using Java years ago. It failed. Developers didn't like it. Existing stuff simply doesn't mix that well with Cocoa and that style of programming. That is why something like Swift was needed. I really don't get why you can bring up languages such as Rust and Go, and complain about Apple's special snowflake approach. Suddenly Apple is doing something developers have b…

Suddenly Apple is doing something developers have been demanding from them for years and something lots of other companies like Google, Mozila and Microsoft has already done. And yet they've decided to do it again, with yet another incompatible language! Joy of joys! (And as for Java, it was my understanding that Apple had hobbled it by refusing to release updates on a timely basis.)

Sun should simply have hired some mac people and done it themselves. Entrusting the success of your entire company ( they changed their ticker symbol to JAVA!) to a 3rd party vendor's whims was and is silly.

Re: The Swift Programming Language

#885
post #824
post #692

Earlier quoted context omitted.

Swift isn't intended to be a systems language FWIW, Swift is categorized as a systems language in the opening pages. But, then, so does Go in its FAQ. To Swift's credit, at least it has deterministic memory management through ARC.

While having some support for garbage collection is good, reference counting is not is a rather expensive way to implement that for applications. This becomes especially bad in multicores since it may dramatically increase the number of writes to shared object cache lines.

Wouldn't a lot of that be mitigated, though, by using tagged pointers in place of RC structs where possible? Seems like an obvious optimization.

Re: The Swift Programming Language

#886

Me (running arch linux): Oooh! I'd love to learn a new language. And great, they have a free ebook it looks like to describe it! Apple: To download Apple Inc.’s 'The Swift Programming Language', you need to have iTunes. Me: What? Apple: Using a 64-bit edition of Windows? On a Mac? Me: No. That experience just killed a potential programmer for you right there, Apple. I had a few hours to kill, and was pumped to jump o…

http://book.swiftlang.eu

That's a 474 page ebook that I can only load in a web browser... Not exactly easy reading.

But thank you!

Re: The Swift Programming Language

#887
post #874

Me (running arch linux): Oooh! I'd love to learn a new language. And great, they have a free ebook it looks like to describe it! Apple: To download Apple Inc.’s 'The Swift Programming Language', you need to have iTunes. Me: What? Apple: Using a 64-bit edition of Windows? On a Mac? Me: No. That experience just killed a potential programmer for you right there, Apple. I had a few hours to kill, and was pumped to jump o…

If you're an Arch user, why would you learn a language that won't ever compile on anything other than OSX?

Because money.

Re: The Swift Programming Language

#888
post #862

Earlier quoted context omitted.

> Why not use Ruby, or Python, or JavaScript -- or even Go, Rust, Clojure, or Scala? (Yes, I realize that the latter two run on the JVM, which would have been problematic in other ways.) Heck, they could have bought RubyMotion and made Ruby the high-level language of choice for development. Because OBVIOUSLY none of them solve the problems they wanted to solve (interoperabillity with Objective-C, fast, native, IDE in…

I'm not sure if you're kidding or not. IDE integration for a new language? They wrote it themselves. Do you think it would have been harder to integrate an existing language? Fast & native also also trivially solvable. I don't know about interop with Objective-C, that's probably the hardest part from your list. But complaining about IDE integration when they're also the creators of the IDE is... silly...

I see that you don't really understand what's needed for real IDE integration. Please, understand one of the main reasons of Apple creating Clang... (hint: because the GCC guys wouldn't take their patches to improve Objc-C & add facilities for IDE integration fast enough)

Clang was easier to integrate with an IDE than GCC, and I strongly believe (after seeing what apple showed yesterday) that swift integration is even simpler.

( They must have made a new LLVM front-end to embrace IDEs equally or better than Clang )

So no, it's not silly to try to design better to have a better integration with an IDE that you control too.

Cheers.

Re: The Swift Programming Language

#889

Just glanced thru the Swift book in about 3 hours. Conclusion: all your programming language are belong to Swift, mostly stolen good ideas, some innovations, a few gripes. I can say Swift takes inspiration and improves on at least these languages: C: typealias struct control structures labeled statements AKA gotos varargs C++: default arguments class instance construction syntax // comment superclass, implementing pr…

All of these features make my eyes glaze over. I hope it's not as bad as it looks. I much prefer a language with only a few core concepts that everything else builds off of rather than one that packs all of the latest PL research into the compiler.

Re: The Swift Programming Language

#890

Earlier quoted context omitted.

I would've voted for buying/licensing Xamarin instead; C#/F# would've given them everything including a lot of fresh programmers. On the other hand i'm happy they didn't as they would've tossed out Android and (at least for me) there is no alternative yet to the speed / power of development here.

Apple has enough programmers developing for their platforms.

Depends what you call 'enough' :) I would say there is no 'enough', but he.
Post reply on HN