Live data from Hacker News

The Swift Programming Language

developer.apple.com

381–390 of 970 posts

Re: The Swift Programming Language

#382
post #37

I'm not even an iOS developer but this is by far the most exciting thing I heard in the keynote. As an amatuer/hobbyist programmer who's self-taught with Ruby, JavaScript, etc., the one thing that was keeping me from experimenting with iOS apps was Objective-C. I know I could tackle it, but it's been hard to take the plunge. I don't know much about Swift yet, but from what I've seen it looks very exciting. So if Appl…

I don't get the hate. Yeah, syntax is unfamiliar, bu once I got used to it I began to really enjoy objective-c. Ymmv etc., but it's now one of my fav languages - though I guess this is mostly due to cocoa

You may not hate Objective-C, but I doubt you love it either. Have you / would you ever use Objective-C to write a web back-end? To write a command-line tool?

Re: The Swift Programming Language

#384
post #337

> Looking for the Swift parallel scripting language? Please visit http://swift-lang.org Apple knew there was Swift-Lang, and still called this Swift. At least they link to it from their website!

Their icon even looks the same. It's also almost identical to the icon used by http://swift.im Sigh.

Not sure about identical icon -- there's only so many ways to draw a silhouette of a bird.

Re: The Swift Programming Language

#385

What i don't really see in the docs is how to calls to objective-c methods are sorted out. For instance, if I have an objective-c class with a method -(void)addNumber:(NSNumber*)num withString:(NSString*)str; How is this called in swift? Is it myobj.addNumber(42, withString:"Hello World")?

In AppleScriptObjC, Objective-C methods are converted from

    -(void)addNumber:(NSNumber)num withString:(NSString)str;
to

    addNumber_withString(num, str)
Swift could be different, though.

Re: The Swift Programming Language

#386
post #37

I'm not even an iOS developer but this is by far the most exciting thing I heard in the keynote. As an amatuer/hobbyist programmer who's self-taught with Ruby, JavaScript, etc., the one thing that was keeping me from experimenting with iOS apps was Objective-C. I know I could tackle it, but it's been hard to take the plunge. I don't know much about Swift yet, but from what I've seen it looks very exciting. So if Appl…

I feel the exact same way. For a while now I've been looking at other ways to develop for iOS, such as HTML5 with PhoneGap or C# with Xamarin, but it's always been a kludge.

Swift looks amazing and I'm really excited to try it out tonight! Great job Apple devs.

Re: The Swift Programming Language

#388

Earlier quoted context omitted.

Swift uses the Obj-C runtime and interoperates with Obj-C code. Those languages assume a shared heap. If Swift modules didn't perform atomic reference counts, that would quite likely break Obj-C code operating on the same heap.

You'd break a ton of Cocoa APIs too.

[deleted]

Re: The Swift Programming Language

#390
post #2

As someone who always disliked Objective C, I think Swift looks very promising. I'll check it out right away :) Software-wise, I feel these current WWDC announcements are the most exciting in years. Looking at the Swift docs right now, I can see many interesting inspirations at work: there's some Lua/Go in there (multiple return values), some Ruby (closure passed as the last argument to a function can appear immediat…

Swift's environment is also very similar to Elm's time travel debugger: http://debug.elm-lang.org/

Direct link to Elm's demo similar to Bret Victor's: http://debug.elm-lang.org/edit/Mario.elm (video: https://www.youtube.com/watch?v=RUeLd7T7Xi4)

Post reply on HN