Hacker News new | past | comments | ask | show | jobs | submit login
Swift Has Reached 1.0 (developer.apple.com)
272 points by mattquiros on Sept 10, 2014 | hide | past | web | favorite | 169 comments



I am not the biggest Apple fan in the world, and will probably not use Swift professionally, but I'm still super enthused about it as a language and I am glad it's entering the marketplace. We're going to have sum types and type inference in a mainstream language! For the first time, professors can teach a language like SML and have a good response to the question "so how is this going to help me in the real world?" I really, genuinely hope this will lead to better choices of languages in introductory programming classes.


They didn't need Swift for real world examples.

F#, Scala, OCaml, Haskell, Clojure already have uses at big financial corporations and bio-informatics.

However, Swift is another great way for spreading the ML gospel to mainstream developers, specially if it slowly takes Objective-C's place in Apple's heart.


Scala/Clojure have been used pretty much everywhere.

Especially with the move towards microservices and reactive architectures.


Does Clojure support pattern matching? AFAIK, the only thing that is "functional" about Clojure is its immutable data structures (and closures, but even JS has those).


Funny to call a Lisp dialect functional between quotes. When Lisp and lambda calculus are the very genesis of FP.

Yes, Lisp can do pattern matching, usually implemented via macros,

In Clojure you use the core.match library.


Well, 1930's functional programming. Those techniques developed into various type theories pretty quickly (at the time for foundational reasons, but also for comprehension/management/expressiveness reasons).

Or if you have a more strict reading, Lisp is implementation-driven FP in the 70s compared to theory-driven FP from the time.


Yes, but keeps being functional programming.

Even Haskell does not have all the mathematics theory that one could apply to functional programming.

A programming language to be representative of a programming paradigm does not need to have 100% of all ideas out there.


I think it kind of does. FP is a moving target---more of a cultural identity than a technical definition. As it becomes more mathematically focused it will become less applicable to (some) Lisps. If this progression continues and dependently typed languages become increasingly practical we may someday call them FP-without-quotes and even displace things like Haskell and OCaml.


Except you assume there is ONE definition of what FP is, which every researcher will have a different opinion of.


Hardly. I even begin my commentary noting that "FP is a moving target" and a social phenomenon more than a technical one. I personally avoid the term as possible in much the same way I avoid the term "data scientist". If you want me to do Data Science I'll get excited and ask you for statistical project details.


I'd call Common Lisp functional between quotes.


> AFAIK, the only thing that is "functional" about Clojure is its immutable data structures (and closures, but even JS has those).

Oh, you sweet summer child. Work with a language without closures and try to do anything functional.


Which language? C++? Java? Both now have closures. Closures aren't the indicator that a programming language is functional; I need something more - though I admit that I'm mostly used to static functional languages, I guess ADTs are not so useful in a dynamic language.


As with any programming paradigm, its not really useful to think of "functional" as a binary feature of programming languages, but rather an approach for which programming languages have varying degrees of support.


At very least it needs to be able to have directly support for lambda calculus.


It has a support for destructuring, but no true pattern matching. Given the lack of algebraic data types, there's the question on what pattern matching would be supposed to match on.


Hey guys, do you know if swift will be ever open-sourced? After the WWDC they said that was early to think about it while in beta. So, what's the status now?


Open-sourcing it would be really cool to see. Chris Lattner last said he wasn't sure if they were going to open source it (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073698....)


Yep, we damn need a bit of more competition within bigs, right now seems just between Google and Mozilla (for the type of language).


C# is in front of all three in mobile space (it compiles to native of course).

C# is the only language that is both modern and spans all major mobile platforms.

http://en.wikipedia.org/wiki/Xamarin


Sure. But Xamarin is hardly open-source, and what OP was looking for was a open-sourced tool-chain & stack for mobile development.


You can't even build Xamarin's sample project without demoing a commercial license, because the sample project is falls outside the app size restriction.


Except you are forgetting C++11 is supported in all mobile SDKs, with C++14 appearing in upcoming versions.

Personally I consider C++14 quite modern.


Considering the minuscule market share that Windows Mobile currently has, C# is close to nonexistent on mobile as of today.


Unity3d alone completely invalidates this claim.


Are there many apps written in Unity? Or is it only games?


Mostly games which are a kind of apps. And games are the most popular apps, e.g.: http://www.statista.com/statistics/270291/popular-categories....


I think at this point we also have facebook embracing D ?


What competition?!? Until either of them support their languages on their respective OSs there isn't any competition.


I think without the supporting runtime libraries also being open-source, there isn't any point in open-sourcing the language is there?

I mean, look at GNUStep. Not widespread adoption.


Actually there is. One of the big selling points of Go is its ability to produce self contained binaries. Swift would share this but also be a language that is more full featured.

GNUStep failure is more to do with Objective-C being such an odd language for most people.


All compilers that produce native code are capable of producing static executables and libraries.

This is only a selling point to developers that mix language with implementation, or never used a native code compiler.


Agreed. I gave up following GNUStep back in 2003, the last time I used WindowMaker as my window manager.


Fond memories. I used to use WindowMaker on my old RH 6.2 system (or was it 7?), maybe even Fedora 1. But I never understood the dock - I was expecting a Windows-style task bar and the dock really isn't that.

The fact that it sat beneath other windows meant you had to constantly shift windows to get to it, which I found frustrating. Likely a configuration option?

It probably runs excellently on modern hardware, albeit with no GPU acceleration or anything to reduce main CPU cycles.


Apple opensoucred their Objective-C compiler only because the GPL on the GCC forced them. They invested a lot in the BSD licenced LLVM. I don't think they did this just for fun, but to avoid they have to do that.


You do realise that the clang part of llvm includes the Objective C compiler and it's under the BSD license as well?


What good is the language without its libraries?


Objective gcc came from NeXT. Apple has a problem with GPLv3, not the GPL in general.


Apple has contributed back to a lot of BSD-licensed proyects, as well as released some of their own, so don't be so sure.


Their live feed yesterday was only available on Safari. Isn't it obvious that they want their herd only inside of a barn?


It was streamed in the open HTTP Live Streaming protocol. It just so happens that the only web browser that implements it in Safari. Worked fine in VLC.

Is there any other way to do live streams embedded on a web page without a proprietary Flash plugin?


Hardly open. It'd be like if Google rewrote the Gmail frontend to native dart and then just blamed the other browsers for not having a native Dart VM. Dart is even standardized (by ECMA), unlike HLS which isn't standardized.

Relevant: http://annevankesteren.nl/2010/09/draft-vs-standard


> they want their herd only inside of a barn?

Awesome. Who should I switch to that doesn't want that?


Apple is the most extreme example. I was able to watch Microsoft's live streams in Chrome for example.


To be fair it wasn't even available with Safari for most of it. Brought back memories from keynotes a decade ago where the stream barely worked.


I don't get why this is down-voted. I think it is excellent point.

My thoughts exactly when tried to view the live stream.


Its being downvoted because of the derogatory naming of Apple users.


What is the practical difference if it's open-source or not? It'll still be OSX-native code, and every OSX user has access to it for free anyway.

Or would that enable a Linux port?


It would enable porting to other platforms, and it's also just useful to be able to look at how things implemented. I've benefitted a lot from being able to look at the Objective-C runtime source code, for example, because I can see how things work or where things go wrong.


> Or would that enable a Linux port?

I would be interested in a Swift port for Linux server-side/command line dev. Not so much client UI dev. Swift on Linux servers could help Apple sell more Macbooks to developers.


OCaml, F#, Haskell, Standard ML all with a longer history and (except SML) being used at the industry.

Why bother with Swift in such use case...


Swift seems a pragmatic take on functional programming. Apple backing means the compiler, libs and runtime will get a lot of work.


And Microsoft puts money on F#, Haskell and OCaml, all of which already have better Linux support.

Swift is great for pushing functional programming down the throat to mainstream developers that wish to target iOS, but it is no more pragmatic than OCaml or F#.

For the OP use case, targeting Linux server software is already better served by the languages I mentioned.


> but it is no more pragmatic than OCaml or F#.

Swift seems more approachable then those languages. Pragmatic in the sense that Rust and Kotlin are.


I fail to see how.


But a Linux-based swift compiler would mean some multi-platform devs wouldn't need OS X as much. Bad for Apple.


If Apple decides/realizes Swift was a bad idea, you will be out of luck with your codebase. Unlike open source where users can continue the work of the corporation.


"You can now submit your apps that use Swift to the App Store. "-that's great news!

For Hackers in SF: We are running a Swift Hackday at GitHub HQ on the 27th September. There will be food, drink, swag and lots of other Swift hackers! Check it out & RSVP at http://SwiftHack.splashthat.com


So, what kind of 1.0 release is this?

- It's Keynote time/September 9, so we call what we have, crashing bugs included, 1.0.

- We culled the features that do not work reliably yet, polished the good parts, and called it 1.0.

- This is a/the set of features that we consider to form a good product, and all features work reasonably well.


I'd say it's a bit of all three.

This is clearly a marketing-driven 1.0. It's really not ready, and wouldn't reasonably be called a 1.0 otherwise.

However, they've been pretty good about sticking to a solid set of features and not over-extending themselves for this initial release. It seems fairly clear that they intend to go in and fill out a lot of stuff later, and preferred a smaller set of solid features to start with rather than trying to do everything at once.


They've also been pretty clear that the language is going to be in a state of flux for long while. From the Swift Blog:

"Binary Compatibility and Frameworks

While your app’s runtime compatibility is ensured, the Swift language itself will continue to evolve, and the binary interface will also change. To be safe, all components of your app should be built with the same version of Xcode and the Swift compiler to ensure that they work together.

This means that frameworks need to be managed carefully. For instance, if your project uses frameworks to share code with an embedded extension, you will want to build the frameworks, app, and extensions together. It would be dangerous to rely upon binary frameworks that use Swift — especially from third parties. As Swift changes, those frameworks will be incompatible with the rest of your app. When the binary interface stabilizes in a year or two, the Swift runtime will become part of the host OS and this limitation will no longer exist."


Can anyone tell me about the interop situation? I'm working on my first iOS app and doing it all the old way with Obj-C, and some things have been a little difficult to grok even though they've been around a while(AVFoundation). I'm very interested in the new Metal graphics API that Apple showed at their presentation. Not sure if I should just switch to Swift for everything now or continue learning/working in Obj-C and slowly transition.


I wouldn't recommend Swift to anyone that's new to the iOS SDK. I answered this question recently on stack overflow (http://stackoverflow.com/a/25751738/77567). Here's what I said:

- Objective-C will be around and supported for a long time. (Apple has a massive amount of Objective-C source code that it's not going to port to Swift any time soon.)

- Almost all iOS tutorials, examples, and books use Objective-C.

- Almost all iOS-specific third-party source code you might want to use is implemented in Objective-C.

- It's easier to use C and C++ libraries from Objective-C than from Swift.

- There are many Objective-C experts you can get help from. There are very few Swift experts.

- The Swift language and its standard library are currently not very well documented.

Stick with Objective-C for now. When you're comfortable with the iOS SDK and Swift is better documented, you can consider learning Swift.


Apple could dramatically accelerate this process by switching their own new development from ObjC to Swift. The huge amount of legacy code means this couldn't happen overnight, but if Apple is obviously making the switch for their own new development, Swift will have a huge credibility boost. Apple wouldn't be able to abandon it (or let development stall) without hurting themselves. Until Apple puts themselves at a similar degree of risk as other Swift adopters, developers are going to wonder about the wisdom of committing to an Apple-only platform that Apple hasn't committed to.


I have a list of Swift resources that I've been collecting: http://www.h4labs.com/dev/ios/swift.html


The more established Swift resource center & community forum is here: http://swiftlang.eu


Stupid question but is Swift just compiled into Objective-C? I'm asking because I'd like to know if I can write an app in Swift that can run on iOS6.


No, more correctly ObjC is compiled into assembler that uses a C/C++ runtime.

Swift uses some C/C++ under the hood, and integrates it's object model into the ObjC object model (which is C). However, swift structs are not objects, from what I can tell they are virtually identical to structs in C (from a memory layout perspective).

Some swift objects are incompatible with the ObjC object model and cannot really be used from ObjC or really any other language (it does name mangling like C++ which makes interfacing rather difficult)

https://developer.apple.com/library/mac/documentation/Cocoa/...


> I'd like to know if I can write an app in Swift that can run on iOS6.

No. From Xcode6 release notes:

"iOS 7 and OS X 10.9 minimum deployment target

The Swift compiler and Xcode now enforce a minimum deployment target of iOS 7 or OS X Mavericks. Setting an earlier deployment target results in a build failure."


To clarify, is Xcode 6 enforcing a minimum deployment target of iOS 7 even if the app is written in Objective-C and not Swift? If so, I think I'll need to stay on Xcode 5 a bit longer.


iOS6 user base will be miniscule in a few weeks unless you are targeting corporate or education markets which update slowly.


Swift is just a fresh new language which is compiled statically just like C/C++.

Swift's Objective-C compatibility mode is a kind of ugly extension feature to support their legacy code. The compiler makes inter-op stuffs automatically.

You can target only down to 7.0 because Apple set the goal of 7.0. There should be some stuffs required to support Swift, anyway it doesn't matter unless you're a runtime engineer. Point is earlier than 7.0 is out of support by Apple.


swift compiles to llvm not objective c.


This might be a stupid question, but does Objective-C have versions? Objective-C was always talked about in terms of the iOS version, even when the language itself was changing (eg blocks).


New Objective-C features are introduced with new versions of the compiler (and Xcode tools/SDK), but each feature may be deployed on different versions of iOS/OS X (depending on how much support they need from the underlying runtime/operating system). This table breaks it down: https://developer.apple.com/Library/mac/releasenotes/Objecti...


The language itself hasn't had any official version numbers since 2.0 (in 2006), but the runtime has (not very public) version numbers if you look at the source: http://www.opensource.apple.com/source/objc4/


My brother has been using swift to learn some programming.

I don't have a mac, let alone iTunes.

Is there a legal way for me to download/purchase a manual to help him with his progress?


I posted this to HN the other day and people seemed to like it: http://www.runswiftlang.com/learn

It'll let you run Swift code from your browser. The Learn page gives you a short run down of some features as well (I'm in the middle of writing up content for it, what's there now is a placeholder really, just the basics) and links to more documentation from Apple.


https://developer.apple.com/swift/resources/ has lots of helpful info, including ebooks and videos.


THANK YOU

That's what I was looking for. Really appreciate it.

iOS/Xcode as a first programming environment is really odd and foreign to me, but my brother seemed excited about it, and I want to encourage him. He's really talented, he could be amazing as a software engineer if he ever wanted to be one.


Xcode is extra strange because it's so non Mac like. Drag with right mouse button to connect things, unintuitive icons with unhelpful hover text...


The language manual is free at apple.com


And it's quite a good manual at that. Starts with a high-level overview of language features in plain English, then provides a firehose of nitty-gritty.



And the official e-book is available in multiple formats (PDF, MOBI, ePUB) on http://swiftlang.eu


www.sososwift.com has been my go-to.

Beware, some of the vids are probably out-dated. It was my experience that every version of XCode6beta that came out broke my app with syntax or object-access type changes. I just downloaded XCode6GM and a bunch of stuff I was doing with "as NSArray" forced me to do "as? NSArray". And self.navigationController.navigationBar needed a "?" appended to controller, otherwise you'd get the very confusing build error saying something like "navigationController has no member called navigationBar".


Cool, that looks like a great resource.

And thanks for the code conversion tips :)


I don't know if Swift would be the best language to learn programming. Python is probably a better option. I would avoid platform specific languages until you are hired to work in that space. Open platforms like Python are much easier than close platforms to get started in Computer Science.

A good place to start with python would be the Introduction to Computer Science course on Udacity.

https://www.udacity.com/course/cs101

If you are interested in ML, I can recommend taking the Programming Languages course on Coursera after the python course.

https://www.coursera.org/course/proglang


The Programming Languages course on Coursera: highly recommended


If you mean learning Swift, check out www.LearnSwift.tips Disclosure: My Site


Neat, thanks for the link.

Also - tld of .tips? I need to register some funny names now


Lol ya it's one of the new ones. If you think that has potential check out all the new TLD's: http://newgtlds.icann.org/en/program-status/delegated-string...


Your brother should instead use a programming language with a cross-platform, free software implementation.


Any word on whether they added static library support? Not having it is kind of a dealbreaker for my workflow, unfortunately.


Can you elaborate on how static library support is a hard requirement for your workflow and why frameworks (LLVM modules) don't meet your needs. I'm genuinely curious as I haven't had a chance to do any real work in Swift yet.

Fellow Googler btw.


A lot of tools don't support them yet. Robovm in my case (I filed a bug against them, though), but also Cocoapods, for example.


I don't believe this is the traditional definition of "reached 1.0".


What do you mean?


"You’ll notice we’re using the word “GM”, not “final”. That’s because Swift will continue to advance with new features, improved performance, and refined syntax"

Typically, when people say that a language "reached 1.0", they mean the very end of that process.


If Apple does it correctly, 1.0 means that there will be no backward incompatibilities until a hypothetical version 2.0.

As a user of a not yet 1.0 language (Elixir, though it has reached release candidate status), backward incompatibilities can be a pain to deal with. The reason: third-party libraries that may or may not be updated, more or less quickly.

And yet it's absolutely necessary to get things right while you design the language, because every single mistake will be carried forward practically forever: see Python 3 as to why it's really hard to fix a language...


> Typically, when people say that a language "reached 1.0", they mean the very end of that process.

That's wrong for practically all cases I know of (Java, C#, Python, Perl).


Ah. Well, other languages also get new features, improved performance, and refined syntax after 1.0. Are you objecting to the implication that the pace of development here will be more rapid, or an assumption that they plan on making backwards-incompatible changes?


I'm objecting to saying "we have reached 1.0" when what they really mean is "we are releasing 1.0 beta 1"


Didn't they do that already back in June?


I wasn't aware that hitting 1.0 means all development ceases.


Only when languages die.


That's fantastic! Now, too bad I can't watch your video tutorials on my Macbook Pro using Chrome. Or Windows 7 using Chrome. The messaging on the site declares it requires Safari. So much of the open web... Quietly moves along to Android.


Apple's stream is just HTTP Live Streaming with H.264 IIRC.

Which means the issue is quite clearly with Google and their insistence on using VP8/WebM instead of what almost every other company is using.


Safari is the only browser that implements HLS except recent Android. Chrome does support H.264 in HTML5.


I think HLS is pretty awesome and this hasn't anything to do with HTML5 as what Chrome supports doesn't allow for live streaming, which is why sites like Twitch still use flash for Chrome. Chrome should support HLS, but they aren't going to for anything but Android, so flash it is for the foreseeable future. If anyone knows why or where I am mistaken I would like to know.


The issue is not black and white. Why should Chrome implement Apple HLS, rather than Adobe HDS, Microsoft SmoothStreaming, or MPEG DASH, among other HTTP streaming formats? What about RTSP -- a protocol designed for streaming, which Android had good support for in the video tag?

In any case, live streaming in Chrome is possible with WebM, or even WebRTC. Flash is not ideal either, but at least it has consistent support on the desktop.


RTSP doesn't go through firewalls easily. That's pretty much why Apple invented HLS. It's a nice, minimalist solution to adaptive bitrates that uses standard HTTP to get the job done. Big players such as the BBC have adopted the standard (ugh, I'm writing a client for it right at the moment!), so it's not a particularly fair categorisation to label this as a purely Apple thing.


If it's possible why hasn't anyone implemented such a thing? I'd like to implement such a thing and I wouldn't know where to start, but I would with HLS. This is the 1990's all over again. Different browsers supporting different standards, different video encodings, different JavaScript features, sometimes, when I'm having a spell, I'm not so sure competition is actually all that great anymore.

And no you cannot stream with webrtc without building a complicated back end webrtc MCU implementation which requires significant engineering and is not at all supported by the creators of webrtc who are focused on peer to peer inside browsers.


In the 1990s, people used to write these things called plugins to add features, like support for specific video containers and codecs, to browsers. Now I guess browsers have to have everything built in or not at all. "Progress".


Chrome supports Media Source Extensions https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/..., which allow a web application such as dash.js https://github.com/Dash-Industry-Forum/dash.js/wiki implement live streaming.


H.264 is still not part of the open web.


despite the generic sounding name, neither is HTTP Live Streaming. HLS is a unstandardized protocol written by Apple


"Unstandardized" is misleading; it currently has a draft spec at the IETF: http://tools.ietf.org/html/draft-pantos-http-live-streaming-...



The web is totally open, but just because something is open doesn't mean you have to support it the same way everywhere. Not everything has to run on everything. As a creator of something, Apple should totally have the right to decide what is best for their own products, website, etc.


> Quietly moves along to Android.

That wasn't very quiet at all.


Many Android users are noisy after an Apple media event, but they have been particularly loud this week. I don't really care what operating system your phone uses, but I do wonder why the iPhone 6 seems to have put so many in such a panicky advocacy mode.


You can download the non streaming versions if you need to.


You were already on android.


The web is not open. It's a closed environment that requires using a specific set of legacy technologies: HTML5, JS, CSS.


GM?


Golden Master. Typically refered to the version of the software that would get burned on floppies/CDs, although the word has taken a more fluid meaning with ubiquitous digital distribution.


Gold Master, the version that will be released to the public barring any surprise blockers.

http://en.wikipedia.org/wiki/Software_release_life_cycle#RTM


Might be time to learn Swift.


Why is a programming language without any open source implementation getting so much attention?


Because:

- it brings interactive programming concepts (Playgrounds) into many mainstream developers.

- it belongs to the ML language family

- it recognizes the advances in mainstream computing in the last 30 years

- not everyone like to type @somekeyord and [some method call] everywhere.

- many of us do buy development tools and open source is just a nice to have feature


> - many of us do buy development tools and open source is just a nice to have feature

I realize this seems nit-pick-y (and for that I apologize), but that's a false dichotomy.

Open source != free. It's possible to pay/buy open source software.


Yes, but I am yet to meet pure open source advocates that pay for more than just hardware.


Is this a rhetorical question ?

iOS is the lead platform for mobile app development. It is also by far the most lucrative both in terms of sales and the quality of the users i.e. for non-sales revenue. Hence there are going to more than a few developers on here interested in it.

We see posts all the time for Go, Rust etc. Why would Swift be any different ?


Because it's Apple.

When Swift was released every hipster and his cat jumped the wagon on how great it is. I even saw someone trying to make webstack out of it.


Don't know why you're getting down voted, sure Swift has some neat features, but if any other company released something like this that was closed source, no one would really care.


Any other company who's language runs over 1.3 million apps used by hundreds of millions of people on average every 6 minutes?


Oracle and Microsoft. But their languages (Java and C#) are not platform dependent.

Just an example:

>Microsoft released C# Roslyn source code, announce Linux support with K Runtime this year

They're going to the right direction, maybe someday...

>Apple released Swift, closed source language that runs only on one platform (Mac)

Apple is so awesome, keep innovating guys! Now let's write a webstack and nosql db using Swift!


C# is hideous to get running consistently (if at all) with recent versions and libraries cross platform. Perhaps this will change in the future, but they've not been particularly brilliant about it over the past decade


I don't know what libraries you talking about but nearly everything from nuget starting with image processing and ending with orms and crypto work just fine on linux.

Even more when K will come out I don't think there will be any worries at all.


NuGet doesn't quite work just fine on Linux, but it's getting better. Slowly.

http://nuget.codeplex.com/SourceControl/network/forks/threed...


Yea, maybe, I don't even know. I develop on Windows and only deploy to Linux.

Let's just hope that with the release of VS2014 and K Runtime all those things will get solved like MS promised.


No other company has a platform with hundreds of millions of users where the first-party app development language is so old and crusty.


Java compatibility and NDK ...


He's getting down voted because his assertion that the attention paid to Swift is driven entirely by hipsterism is Slashdot-esque nonsense. People who make a living writing Objective-C will be making a living writing Swift.


Because calling people "hipsters" for liking a new language is juvenile.


is/was Javascript open source?

what matters is the platform

no one cared if Javascript the language was open source when it was the only way to do client side scripting for web pages.

similarly Swift has iOS and OSX - other languages are available on these but I guess developers are anticipating Apple emphasising Swift over Objective-C going forward


Well it's hard to say that JS had this much attention in 1995. Let's give swift 20 years and see where it takes us?


It couldn't be the quality of the language or the popularity of the platform. Just "hipsters".


Why does it matter that it's not open source? There is plenty of closed-source stuff on here all the time. Maybe it's getting attention because the iPhone is still an incredibly profitable platform to code for, and a lot of people on here are involved in that.


Because it's going to have more reach than most open source programming languages. In a few weeks, millions of people are going to be running Swift apps on their phones, tablets, and desktops.


Can somebody tell me why in 6-7 years I will be rewriting Swift apps ?


What is this? Javascript for Mac?


Yes. And put together in even less time than JavaScript 1.0


That isn't true. Swift has been dev for quite a long time in secret.


Regarding which basic features they had to add after the first wave of beta feedbacks I don't believe them that they have been developing + using the language for years.


It wasn't in heavy use, Chris Lattner was experimenting with it solo i thought.


If true, you should be seriously scared of what Apple is capable of.


I can't believe Apple would release a brand-new language with zero baked-in support for concurrency. In this day and age? Looks like developers will have to resort to 2nd grade efforts like GCD. I just don't get it. There's no excuse for it. Port Go's channels and go-routines to it, or something else, but come on - it's 2014, not 1998?


If you think about it none of what you said really makes sense.

In what way is GCD not a concurrency mechanism ? And why would you port Go's channel/routine model when it is less flexible than the Actor model ? And even then what type of mobile applications require that level of concurrency ? I've built about 20 mobile apps and not once needed anything more than a few background tasks.


I don't really thing GCD counts as "2nd grade" - have you actually used it? It's really nice.


Swift has GCD and NSOperationQueue which work well. Why marry yourself to that functionality if you can externalize it with the potential to change it in the future?

Why doesn't Go have generics and sum types?


> it's 2014, not 1998?

I could say the same of Go as a language, given the disdain for all what modern languages offer.

With modern languages where library types can be treated as first class types, concurrency can be exposed via libraries.


Well they are the people who sold a phone with no support for background tasks. They can do as they please.


iOS supports the most common background tasks.


It didn't though for many years


Which was a user-friendly decision during the period where android phones frequently died after only 4 hours of use.


> frequently died after only 4 hours of use.

I've never had a phone die after 4 hours of use and I've had the 1st Gen iphone and the HTC G1


Sorry, I'm pretty sure you meant Swift has reached 2.0. And that was a couple of months ago. Also why are you people talking about Swift like it's a programming language and not an object storage system? :)

http://opensource.com/business/14/7openstack-swift-brings-st...




Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: