Live data from Hacker News

The Swift Programming Language

developer.apple.com

421–430 of 970 posts

Re: The Swift Programming Language

#421
post #372

1) This looks much less intimidating than Obj-C, I may finally write an iOS app. 2) Hopefully this puts some pressure on Google to make Go on Android easy (although I'm a Java guy myself). 3) What about swift-lang ( http://webcache.googleusercontent.com/search?q=cache%3Aswift... ). It has the same name and almost the same icon. Did they work with these people or just screw them?

Re: 3)...

Look at the bottom of the page. There's a link to the swift-lang site...from an Apple web property. That's probably more publicity than the swift-lang folks could have hoped for in a million years.

Re: The Swift Programming Language

#422
post #83

“You also don’t need to write semicolons at the end of every statement.” Please. Please. PLEASE don't be whitespace delimited!

Ruby doesn't have neither semicolons nor whitespace syntax

actually, the rules are the same as swift. newline is the end of a statement, multiple statements on the same line require a semicolon.

Re: The Swift Programming Language

#424
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.

The Swift is a bird. It's unsurprising that the icons are of birds.

http://en.m.wikipedia.org/wiki/Swift

Re: The Swift Programming Language

#425
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…

I really don't see the Golang influence at all. The multiple- return- value semantic is closer to Ruby's than to Golang's; you're returning a tuple, which happens to have natural syntax in the language. Defining Golang features that don't exist in Swift: - Interface types with implicit adoption (Swift takes explicit protocols from ObjC) - Error types - Relatedly, the "damnable use requirement" and its interaction wit…

(I like what I've read about Swift and expect to be building things in both Golang and Swift, and often at the same time).

How about a blog series where a developer implements something in Golang and/or Swift, then you explain how it's insecure? Then the developer tries to fix it and you explain something else that's insecure. Rinse, repeat.

Re: The Swift Programming Language

#426
post #414

Earlier quoted context omitted.

He mentioned the desire to drop the "C" from objective-c, but I'm curious what this means for using c/c++ libraries now. Do they need to be wrapped by objective-c before being visible in swift?

Swift uses a special "bridging header" to expose Objective-C code to Swift. This header will presumably be processed by the Swift compiler. In the other direction, XCode will automatically generate an Objective-C header to expose your Swift code to Objective-C.

The ibooks guide references a "Using Swift with Cocoa and Objective-C" document. Is that where you got your information?

Re: The Swift Programming Language

#427

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")?

There is a section in the docs about it. Similar to what you propose. https://developer.apple.com/library/prerelease/ios/documenta...

Re: The Swift Programming Language

#428

Earlier quoted context omitted.

Extremely closed, at least at the moment. Can't even read the language reference without Apple products.

You can actually read the language reference with a "standard browser": https://developer.apple.com/library/prerelease/ios/documenta...

Hmm, can't seem to change page in Chrome. In Firefox, it works slightly better but still doesn't really. I'm guessing it only works on Safari? How can they release a language and not have proper documentation that is accessible by anyone?

It'd be great if someone could get the book, convert it to PDF and post it online.

Re: The Swift Programming Language

#429
post #134
post #79

[deleted]

> language website: http://swift-lang.org/ Nope, completely different. Really scummy of Apple to just nick the name of an existing language for their new one, it's been five minutes and people are already confused.

You mean like Google did for Go? Meh

Re: The Swift Programming Language

#430

The demo from the WWDC keynote is quite impressive. Unfortunately, this site seems to have been slashdotted. (Basically, Swift is "Apple acquires their own LightTable.") It's touted as a language for parallelism. I'm curious about its concurrency primitives. Since distribution is shown as a top feature, I'm going to guess that it has an Erlang-like actor model. Having ARC and not needing GC will end up being a big fu…

I haven't seen a single mention of parallelism in the 600+ page language manual. This will probably be done through libraries.
Post reply on HN