Live data from Hacker News

“Swift will be open source later this year”

apple.com

181–190 of 573 posts

Re: “Swift will be open source later this year”

#181
post #164

Earlier quoted context omitted.

I'm hopeful but until I see a license and what is and isn't opened sourced I'm going to be reserved.

One imagines it'll be liberally licensed like LLVM, which Chris Lattner also BDFLs. And they said it would be the compiler and the runtime for OS X, iOS, and (surprisingly) Linux.

I think it's most likely going to be integrated into LLVM so you are probably right.

Re: “Swift will be open source later this year”

#182

Ah, interesting. I've suddenly gone from "Not caring at all about the existence of this language" to "Mildly intrigued." It's amazing what some opening of control will do.

I'm hopeful but until I see a license and what is and isn't opened sourced I'm going to be reserved.

OSI-approved permissive license, per https://developer.apple.com/swift/blog/?id=29

Re: “Swift will be open source later this year”

#183

I will surely be downvoted for speaking so off the cuff, but I haven't really enjoyed swift so far. How has the general developer reception been to the language, not just with respect to obj-c, but also to java or any other turing complete language?

I think it's terrible. Parsing a JSON response into a Swift object takes a full-day to figure out when it's literally just JSON.parse(response) in any other language. You can't pass immutable structures (structs) into NSNotifications and I can't figure out why. It's confusing and poorly documented, and a complete chore to use. React Native is a godsend.

>Parsing a JSON response into a Swift object takes a full-day to figure out when it's literally just JSON.parse(response) in any other language.

Something which has nothing to do with the language.

Here's how you do it with a popular Swift lib:

let json = JSON(data: response)

if let userName = json[0]["user"]["name"].string{ .... }

Re: “Swift will be open source later this year”

#184
post #120

Earlier quoted context omitted.

Windows already has F# and compilation to native code via NGEN, MDIL and .NET Native. Swift won't bring much anyway.

I disagree. Swift and its accompanying libraries are designed for automatic reference counting rather than tracing garbage collection. I think that's a big deal for mobile apps (see Drew Crawford's take on GC in mobile apps, http://sealedabstract.com/rants/why-mobile-web-apps-are-slow... ). In that light, Swift projections for WinRT would be great.

I know that post pretty well.

Swift only has reference counting because it made sense as the language shares the Objective-C runtime.

Objective-C only got ARC because Apple never managed to make their GC work properly without crashes in the context of Objective-C code, given its C underpinnings.

CS literature is full of examples on how to achieve performance comparable with GC with reference counting, the solution ends up being a mini-GC anyway. And reference counting cannot compete with GC implementations in lock free algorithms, even with deferred counting.

Re: “Swift will be open source later this year”

#185

Earlier quoted context omitted.

Supporting Linux is a surprise, but I think it's a great move on their part. Think: How many iOS apps are frontends to a server API? And how many of those APIs are running on Linux servers? Swift on Linux means ~all the code for a client-server iOS app can be written in the same language.

I've been wondering for a while now why no one builds an Obj C backend for their apps: https://news.ycombinator.com/item?id=9500855 Being able to deploy on Linux might be what it takes!

It's exactly because of server support. I'd LOVE to write obj-c on the backend - libgcd and the dispatch syntax alone makes it worthy, not to mention ARC, the ability to write pure C inline (not in an unsafe block or the like).

Re: “Swift will be open source later this year”

#186
post #64

Did they tell under what license? If they really want to mess things up, they would choose GPL2 without the 'or later' part, but my guess would be BSD, but Apache and Apple's Public Opensource License also are possible ( http://www.opensource.apple.com/apsl/ ).

https://developer.apple.com/swift/blog/?id=29 says OSI approved permissive license.

Re: “Swift will be open source later this year”

#187
post #149
post #122

Earlier quoted context omitted.

> The point of Obj-C was kind of to avoid writing the kinds of apps where a great type system would really shine, swift lets you build those kind of apps, but in my opinion most of the time we shouldn't be building them. Can you clarify this? What is the kind of apps where a "type system would really shine"? How can you avoid writing them?

Apps that have a lot of YAGNI features. eg. For some reason your app has the ability to use Postgres instead of SQLite, even though you always use SQLite. eg. For some reason your app supports Postgres/MYSQL/SQL Server because every enterprise you sell to wants to run their preferred database instead of the one that works best with your product. In short 'enterprise' apps.

This seems to conflate type systems with interfaces -- while not really having a clear idea what the latter serve either...

Re: “Swift will be open source later this year”

#188
post #158

Earlier quoted context omitted.

Yeah it's only possible to write iOS apps with C, C++, C#, Ruby, Javascript, Python, LUA...

Not with first-class support is isn't.

So? Is there any platform that has first class support for more than 1-2 languages?

Re: “Swift will be open source later this year”

#189

Earlier quoted context omitted.

His comment is older than any of the comments mentioning the lawsuit.

It's still uninformed crap that implies Apple reneged on a promise, when in reality they were forcibly stopped.

The fact still remains that Apple made a big promise without analyzing all the legal aspects of it. Most average to big size companies do the reverse of it - Make sure the legalities are in their favor before making big announcements.
Post reply on HN