Live data from Hacker News

Swift is Open Source

swift.org

431–440 of 458 posts

Re: Swift is Open Source

#431
post #250

Earlier quoted context omitted.

It doesn't look like they've opened any of the existing Foundation framework we all know and love and that's written in Objective-C. The swift-corelib-foundation repo contains a bunch of .swift files, and those contain lots of calls to NSUnimplemented(). The Core Foundation stuff (included in swift-corelib-foundation) has been open for a while: http://www.opensource.apple.com/source/CF/

The Foundation stuff is a complete Swift re-implementation of Foundation (fairly impressive goal) and is still in-progress (basic classes like NSArray and NSData look complete but none of NSURLConnection is implemented). They are targeting Swift 3 to have them complete. As the Core Libraries project page says: "These libraries are part of the work towards the future Swift 3 release. They are not yet ready for product…

NSURLConnection is deprecated in iOS 9 so I won't be surprised if they choose not to implement anything that's been deprecated.

Re: Swift is Open Source

#432

Earlier quoted context omitted.

It's really interesting that they decided to retain the full history! It also gives away some information about the initial contributors and the timeframe of when they started.

I love it. I've never taken a compiler class so going through and reading all the commits since day one is really fascinating. It's easy to see exactly how the language and structure of the code base came to be. Super cool in my book.

right!

Re: Swift is Open Source

#434

Earlier quoted context omitted.

Hahaha, I'm amazed that the Rust developers were able to do that. Saying it was "quite a pain" is the understatement of the year.

Yup. I really think it was worth it though, it taught us a lot about how to make the language.

Mind, are you not worried at all that it may have taught you a lot... about how to make a language for writing compilers in? (paraphrasing Chris Lattner)

Re: Swift is Open Source

#435
post #386

Super excited! I will totally be exploring Swift for quantitative work. Julia has been great so far, but a lack of good IDE tooling is making a large codebase difficult to navigate and keep clean. Python has even less type safety than Julia. Swift has a REPL! Go doesn't, and its lack of generics makes writing most algorithms very limited (there isn't even a matrix 32 library, just 64 bit). Java has horrible native in…

Have you looked into F#?

It's been open source for a while and there is a very good ecosystem that exists already for it. Plus the language itself is a pleasure to use.

Re: Swift is Open Source

#437

Earlier quoted context omitted.

and according to someone I heard on a podcast, many of the engineering leadership heard the open sourcing comment for the first time while Steve was up on stage as well.

Mind linking the podcast? Generally curious.

Not sure which particular episode (you might be able to find it by looking through old shownotes) but this was mentioned on Accidental Tech Podcast, I think by John Siracusa (of really long MacOS review fame)

Re: Swift is Open Source

#439

Is it possible to write complex iOS apps using swift alone, without having to learn any Obj-C? Is there full library support, good ecosystem, etc.?

At least read the ObjC interop document. You may be able to get away without writing any ObjC, but most of the libraries you'll be using, including Cocoa, are ObjC.

Re: Swift is Open Source

#440

There's one thing I can't understand about Apple's approach, and that is their pathnames. As good as Swift is, putting it by default in asinine paths like "/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin" doesn't help anybody (and a ton of stuff in OS X is like this). A more Unixy way to do this would be /opt/swift-3.0/bin, where /opt/swift is a symlink to /opt/swift-3.0. Even Apple used to limit the p…

> A more Unixy way to do this would be /opt/swift-3.0/bin, where /opt/swift is a symlink to /opt/swift-3.0.

This could cause entertaining problems for people who routinely install both current and beta versions of dev tools (which is relatively common; if you're working on iOS10 features for your new app but still need to release iOS9 updates during the beta period you more or less _have_ to, for instance). I suspect that's why they changed it in the first place.

Post reply on HN