Hacker News new | past | comments | ask | show | jobs | submit login
Introducing Swift (developer.apple.com)
366 points by pdknsk on June 2, 2014 | hide | past | favorite | 217 comments



So it looks like the language isn't open source and won't target non-Apple runtimes?

I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.


Now that Microsoft has been open sourcing so much stuff I was expecting Apple to follow the wave and release Swift as open source too. It's a shame though.


I'm old enough to remember Apple suing Microsoft for "copying their look and feel". Open source is something Apple only does strategically - when they have to or it suits them - it is not part of the company's ethos.

http://en.wikipedia.org/wiki/Apple_Computer,_Inc._v._Microso....


> Open source is something Apple only does strategically - when they have to or it suits them - it is not part of the company's ethos.

What Fortune 500 (or even 5000) systematically open sources every piece of technology? Every company I can think of -- Yahoo, Microsoft, Google, Facebook, LinkedIn, Twitter, Amazon, LinkedIn, AOL, Craigslist, Oracle, -- selectively decides what to open source.

I'm not saying that's right or wrong, but Apple is far from alone in doing so.


None of them are 100% open or closed, but clearly some are more open than others.


more open? what a funny joke i ever heard. please define the meaning of the more, and at least tell who is the more open one.


Red Hat.


Yeh, I agree. I was surprised when they open sourced webkit. But like you said, it's strategic. I don't think they care that much about the browser. Their emphasis is on apps running in their ecosystem.


They didn't have a choice about webkit; it was a fork of KHTML, which was a part of KDE (and available under the terms of the GPL).


Actually, WebKit was a fork of KHTML, correct, but it is licensed under the terms of LGPL. One extra letter, but a world of difference. This is why they had to open source KHTML, but they could get away with not open sourcing Safari (if KHTML was licensed under the GPL, any app that linked against the library would need to be licensed under the GPL, too.)

Let's not forget that webkit when it was released was little more then a code dump - one big patch that had to be applied to KHTML.


Also "they didn't have a choice" sort of ignores that they did have the choice of not using khtml and wouldn't have, if its license could've been problematic for them.


You can see first chapter of the book here

http://imgur.com/a/AuzGw

I've uploaded it just now


Why I get down votes? It's a free book. People on other platforms can't access it.


Welcome to HN where it seems everyone disregards others work/opinions if they have any reasoning that may only make sense to them.

I'll get down voted for this, and it will be truly ironic.


But it will be worth it.

Bring on the Downvotes!


thanks for this. I clicked their link(on my less than a year old ~$2000 MBP) and it opened iBooks and sat there with a loading icon for minutes. My first and last experience opening iBooks.


Combine this with their OpenGL replacement ("Metal") and that pretty much kills any cross-platform at all doesn't it?


It's not too hard to write a graphic engine that abstracts out the graphics API, but it would have to be done in a language other than Swift...


Realistically all the Kits aren't (officially) portable anyway.


Is there anything to stop a independent implementation? Like C#/.Net and Mono?


Well if the core of the language is licensed and closed source (is it?) and they do not make a standard iso, it's really problematic to reimplement it in another platform. Both from a legal that from a technical pov.


Just look at the latest ruling on Oracle vs. Google using Java...


No point?


horrible adoption?


I can't even view the book about the language without having an Apple device or installing Apple software.


It's available online in html:

https://developer.apple.com/library/prerelease/ios/documenta...

I assume you'd need a developer account, though.


The book is ePub with no DRM. You don't need an apple device. You could download it on iTunes on windows, and read it with any ePub reader. if you don't want to install itunes i guess you could get a friend to email you a copy.


Open source or not, Swift will never be appealing for the world outside Apple's garden if it will be as intertwined with Cocoa as Objective-C currently is. It will be nice however to see how well Swift could be ported to Android.


There's no indications yet that it won't be. I suspect a large part of it will be part of a timed-release with their next merge to LLVM. But only Apple knows for sure.


[deleted]


Different Swift language. That is a "parallel scripting language" for scientists and is written in Java.


That's a different Swift.


This link is for a previously existing Swift language.


This is only a bit of a bummer because I already expected as much.


Looks like Recruiters will now be seeking Swift Developers with at least 5+ years of experience.


The Swift playground supports time travel, so this may be possible.


Yeah, I saw @Stammy's tweet too. https://twitter.com/Stammy/status/473536229531586562


By my count, approximately 1839 people have tweeted something similar so far. The first one was pretty funny.


Dozens of people were tweeting this same joke.


even i tweeted the same joke, not knowing others were doing it.

What I find more amazing is that, as humans, we have all chosen "5+ years" as the experience level in our jokes.


I'm impressed that it looks like they're turning Bret Victor's demo into a reality with playground. Check out his demo if you haven't: https://www.youtube.com/watch?v=PUv66718DII

Really, really interested and excited about learning Swift.


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

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


Wouldn't say I'm impressed but definitely really excited. BVictor is pretty amazing. Anyone who hasn't seen should check out either these talks. There're great for getting extra inspired about coding or the coding life, and great for perspective too:

The Future of Programming: http://bit.ly/1pNtKMh Inventing on Principle: http://bit.ly/1opRrJp


[deleted]


Yes, it's funny that people didn't pick up on Apple potentially doing more with it when his demo made the rounds a few years back.


Why would they "pick up on" it? That was almost two years after Bret left Apple and it's been another two years since. At this point these ideas are as available to anyone as they are to Apple.


It's funny that people never seem to think about IPython. It has a lot of this kind of stuff.


Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness.

For example:

var apples = 3; // mutable

let oranges = 5; // immutable

let summary = "I have \(apples) apples and \(oranges) oranges";


You say "Apple syntactic craziness", but "var" is identical to JS, et. al. and "let" is identical to ML, et. al.

The string interpolation syntax is unique, but kind of makes since given then \ is the escape character in C strings.



the typing system seems to be from ecmascript as well

var distance:Double = 70.0


This type annotation syntax comes from ML in the 70s (60s?).


Pascal actually predates ML and has this syntax too. http://en.wikipedia.org/wiki/Pascal_(programming_language)


Programmers here? But they haven't ever heard of BASIC? LET has been used for variables least since 1968.


Hasn't it been used for binding in LISPs since the early 1960s? Swings and roundabouts.


var and let were referring to ripping off other languages and the syntax you pointed out as unique is the syntactic craziness.


And "let" will have a totally different meaning in ES6. It's a bit weird to use a keyword from some language with the same meaning, and another keyword from the same language but with a totally different meaning.


Using the backslash+parens for interpolation is really clever! No more ambiguity like when using % or {}. Is that a Swift original syntax?


Yeti (http://mth.github.io/yeti/) uses that syntax. One of my favourite languages.


I think it makes it harder to read interpolated strings, I'm just so used to seeing % and {}.


Alternative viewpoint based purely on your three lines (I can't seem to get to the reference manual...) - all of those seem like pretty good design decisions. To me, "var" sounds like it makes something that is variable and "let" sounds like it is creating an equivalence. The "\(foo)" syntax actually looks really clean to me, though I can't recall having seen anyone use it for that before.


The language itself isn't radically different from most mainstream Algol style languages. That's good because it makes it pretty easy to pick up. In addition to what you mention on variables vs constants, the only feature which is nice seems to switch-cases.

a. No fall through. This is a plus in avoiding bugs. This is minus if you really know what you are doing and want fall throughs b. Pattern Matching in case statements. This is bit interesting and should take care of the previous case.

Other than that my first impression is it's a mishmash of various programming languages. Everything else that they demo'ed seem to be features of XCode (rewinds, variable lifetype analysis etc..) rather than the language itself.


From the manual: “Execution doesn’t continue to the next case, so there is no need to explicitly break out of the switch at the end of each case’s code.” I bet I know when that became a priority!


That should actually be 'no implicit fallthrough'. You get fallthrough with the fallthrough keyword.


A quick scan of the ebook has a pretty nice looking collection of stuff: option type, generics, protocols, etc.

A bit of python looking stuff and some ruby looking stuff in there too. I am intrigued enough to give it a try when it is available.


[deleted]


I don't get what you don't get. What's strange here?


Do you need the semicolons?


Nope. "you don’t even need to type semi-colons." [1]

[1]: https://developer.apple.com/swift/


but you should probably use them anyway :P


no


Is this related to Bret Victor's stuff? My mind was blown when I saw this video 2 years ago, and I can't help but see similarities here:

https://www.youtube.com/watch?v=PUv66718DII&t=10m42s


Bret used to work at Apple. I don't believe in coincidences. :)


Looks like they pulled a Golang: http://swift-lang.org


They do include a link to the other swift at the bottom of the page:

> Looking for the Swift parallel scripting language? Please visit http://swift-lang.org


Anyone else notice the similarities in their logos as well?


You do realise that link is completely unrelated to what Apple is doing, right?

EDIT: Nevermind, my mistake. I thought the comment was about Apple was making their own language like Google did with Go, not Go! already existing as a language


Yeah, that's the point. There's already a programming language called Swift but Apple is using the name anyway.


That's precisely his point. There was already a pre-existing (but little-known) language called Go when Google announced theirs.


Gotcha, my mistake. I thought the point was Apple was making their own language like Google did with Go and he was just linking the wrong language.


> Looking for the Swift parallel scripting language? Please visit http://swift-lang.org

Did they not know or do they just not care?


I think the lawyers decided that they didn't need to care...


They have enough money to not care because they can cover the cost of the worst case scenario.


I think they just don't care. Swift-lang looks to be completely different when you look at the examples[1]. Its syntax is more java-y then Apple's iteration.

Also Swift-lang is Apache 2.0 licensed, which I have a feeling Apple wouldn't use as a base for a new language.

[1] https://trac.ci.uchicago.edu/swift/browser/branches/release-...


"Change your apps name. Not that big of a deal."

--Steve Jobs


There seems to be a tradition in corporate programming languages to reuse the name of a somewhat obscure existing language. Google called their language "Go" despite there being already a language called that as well.


Looks like they took inspiration for the icon also. Look at the second to last icon on that page.


more likely both icons were inspired by the bird's distinctive silhouette


I hate to admit, but dumb me didn't realize this was a bird. I thought swift as in quick.


"The debugging console in Xcode includes an interactive version of the Swift language built right in. Use Swift syntax to evaluate and interact with your running app, or write new code to see how it works in a script-like environment. Available from within the Xcode console, or in Terminal."

Does this mean that we can use the Swift REPL in the Xcode debugger to explore running ObjC programs? That would be enormous fun, not to mention very powerful.


EDIT: Link is live now.

Here is the link to the online documentation if you don't want to download it on iBooks.

https://developer.apple.com/library/ios/welcome_to_swift


Really excited and surprised by this announcement. Anyone know the provenance of this language? Who built it, what are its intellectual roots?


Well, Chris Lattner is involved at the very least, which is a good sign.


It seems like the only way to view the programming language documentation is on iBooks on an iOS device? For a programming book, this is ridiculous.

Edit: The latest version of OS X does support iBooks. Lets hope you have that.


It's really kind of amazing just how locked down the apple ecosystem is. Not only have they eschewed the general trend toward more open and cross-platform languages, they've even made the documentation single-platform. That's just wild.



The page at https://developer.apple.com/swift/ says you can visit some language guides and reference at https://developer.apple.com/library/ios/referencelibrary/Get..., which does not work.


Apple has a mixed history with the openness of their tech. It could be that the only place you'll be able to run the language is on an iOS device. We'll see.

Looks like the end of the line for this particular bit of history: http://www.tikirobot.net/wp/2008/11/22/why-gcc-has-a-free-ob...


iBooks app is also available on the Mac. As the language is Mac and iOS specific it's not all that crazy.


hah, it seems iBooks is only available on Mavericks. Rather frustrating when I just want to read the documentation.


Given you will require Mavericks or Yosemite run Xcode 6 and code with it, that makes for a sort of consistency, despite the frustrating closed-ness.


Ah, that is dumb. They're bound to put a PDF on the dev centre when it's back online.



Well, you can always just open it with a zip program (e.g. WinZip on Window) if you're desperate enough.


Posted the direct epub dl here: https://news.ycombinator.com/item?id=7835420


Seems fine for a book intended to teach OSX/iOS dev.


Yeah, and iBooks on iOS requires iOS 7. If someone figures out how to get a usable standard ebook file out of this please let me know.


You can update iBooks on iOS 4.3.something to a version that'll read the Swift manual. I'm reading it on my iPad 1 right now.


You can read it on a Mac too.



Is there any way to get this without installing iTunes?



Yes, posted the direct dl here: https://news.ycombinator.com/item?id=7835420


Swift has a built in option type

“if let actualNumber = possibleNumber.toInt() {

    println("\(possibleNumber)  value: \ (actualNumber)")
} else {

    println("\(possibleNumber) could not be converted to an integer")
}”

Nice to see the Apple's language developers embracing functional programming by providing a clean implementation of the Maybe Monad as well as support for closures.


I love this feature, but it's not quite the Maybe Monad, which lets you assemble a sequence of (possibly failing) statements together, and fail the whole sequence if any of the parts fails (without if-statements or switching of any kind).


'Optional Chaining' sounds like it lets you join thing together to some extent:

https://developer.apple.com/library/prerelease/ios/documenta...


Oh, cool! Straight out of CoffeeScript. Yeah, that's pretty much the monad instance of Maybe.


I don't think this is very functional. First of all, the let binding inside the condition has type bool by itself (instead of the normal let-in construction). Also, it's scope permeates into the body of the if condition. The whole thing is very much like C-style NULL/Not-NULL check:

   if (x = proc()) {printf("%i", x);}


https://itunes.apple.com/en/book/swift-programming-language/... (direct link to iBook store).

Edit : Changed the link to en.

Does anybody have a direct link to the Xcode 6 beta ? Or mirror download link ? Thanks.


Switch nl to your language code for best results. I used en.

Thanks for the direct link!



Elm has had a "time traveler" debugger for a while http://debug.elm-lang.org/


For those interested, "A while" = since a few months ago, AFAICT.


This will revolutionize programming education.

Interestingly enough, the time manipulation in Swift was inspired by a game called Braid (http://en.wikipedia.org/wiki/Braid_(video_game)) released back in 2009.

This will help young programmers solidify the connection between giving the computer logical commands and what is outputted on the screen immediately.

Reminds me of how excited I was when Processing (http://www.processing.org/) was released which made it dead simple to interact with a screen and graphics. Didn't have live feedback, but it made it incredible easy to understand OOP.


How do you see it as revolutionizing programming education? I'm pretty ignorant in this area, but it seems like a very high level language that abstracts a ton of stuff - and very platform specific too if I'm not mistaken. Is that really where we want people to start? I would have thought either a highly graphical language with buttons and widgets for early education, then moving onto platform-agnostic stuff like java and obj c would be the thing to do. Maybe you're talking about later stuff, college and beyond, which makes sense - at that point specialization to this extent seems like a good idea. But as I said, I'm pretty out of touch.


I work with someone who previously was a college professor teaching computer science. The university decided to standardize on Mac and iOS hardware, and teach how to program iOS apps as a way to make the CS program more popular.

Trouble was, teaching the entire XCode and Objective C tool chain was not a particularly easy entry point for learning how to develop programs.

(Maybe there were other prerequisite programs, but still, you need to understand C to really understand why a lot of things are the way they are in Objective C, in addition to message passing and object orientation, pointers, and other quirky stuff in order to really wrap your head around iOS development.)

Swift and the corresponding tools look like they would have been a godsend for teaching that class. A more practical way to get students started writing programs they can actually run on their phone.


Swift doesn't look more high level than other scripting languages, but higher level than Obj-C yes, but also much more modern with a good toolset which will probably boost dev productivity.


Live preview. Kids changing a value and seeing their widget move differently or change colour instantly, that can be magical.


This is not new though. See http://debug.elm-lang.org/


There was a time-travelling debugger for Java back in 2006:

http://www.lambdacs.com/debugger/debugger.html

But it never took off, for some reason. And it didn't have the arresting graphical aspect.


Was it inspired by Braid or the work of Bret Victor at http://worrydream.com?


Bret Victor admitted at some point to being inspired by playing Braid.


I posted this elsewhere in this thread: http://vimeo.com/36579366

Bret Victor worked at Apple for a time as well.


> This will revolutionize programming education.

It could, if it were open and not limited to iOS/OSX.


A lot of schools have iPads, I suspect a few may end up buying Mac Minis.


This will also be incredible for ease-of-setup. Install Xcode, and you're ready to go. No other dependencies.

Setting up a dev environment can be one of the big reasons people fail to learn to program.


>This will also be incredible for ease-of-setup. Install Xcode, and you're ready to go. No other dependencies.

1. Buy particularly expensive computer 2. Register as an apple developer 3. Install Xcode, and you're ready to go.

> Setting up a dev environment can be one of the big reasons people fail to learn to program.

Citation needed :)


Actually:

1. Buy a Mac mini for $600, which doesn't strike me as particularly expensive.

2. There is no step 2.

3. Download Xcode from the Mac App Store for free.


Yes, there is a step 2 at this very moment because I can't even download this version of XCode without having developer id.



About time! Objective-C is increasingly becoming inadequate for Apple software development. Apple knew that. They finally decided to do something about it. If it goes popular the same as Microsoft C#, that would be a huge win for both Apple and developers.


Looks nice. But I wish one could interop it with C++ like Obj-C.

As it is now I won't be able to use Swift because of that :(


What's the solution to this? Interact with C++ via Obj-C, and then interact with that Obj-C with Swift?


Still on an Objective-C runtime, so it's hard to see how the performance gains they claim are achievable, but otherwise having an interpreted version should be good for productivity.


Correct me if i'm wrong, but Swift has static typing (with type inference, but still with a strict type on every variable), whereas Objective C has dynamic typing with optional type annotations. Having ubiquitous strong type information available should make it much easier to generate fast code.


Hm, maybe that's it. I thought typing was still dynamic because of the multiple return types.


guessing multiple return types are supported by just returning a tuple?


maybe it is accompanied by improvements in LLVM? Or optimizations in LLVM that are more feasible with Swift (it has immutable values).


Looks a lot like golang meets haskell:

func makeIncrementer() -> (Int -> Int)

EDIT: Why the downvotes? was just an observation not a criticism. Looking forward to using it instead of Objective-C.


Complete history of variable state over execution time of a program is AWESOME!


Couldn't help to think about Greenspuns tenth rule[0] when I saw the release of Swift. Even though it's kind of neat with the REPL and at a first look xcode looks promising.

[0] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule


I have a question.

Why doesn't Apple try to make easier to learn and easier to use programming languages instead of focus on the more difficult ones like Objective-C?

Why not use BASIC, Python, Ruby on Rails, Java, or even Pascal for their new language so you get more people to become developers and make iOS and OSX apps in greater numbers because it is easier?

I mean they could have just used Monodevelop: http://monodevelop.com/

Made a tool to convert Winforms to Cocoa Forms to port some Visual Studio C# and Visual BASIC apps to iOS and OSX, and win over the Windows-Only developers to the Apple platforms?

This Swift language seems so hard to learn, almost like F# or something. Not as hard as Haskell, but for the average developer it is going to be painful to learn.


Looks like C# with .NET Native, some sort of.

Playground is interesting.


Minus awesome IDE with automated refactoring.


Buried as dupe of https://news.ycombinator.com/item?id=7835099. (The idea is to have one discussion per major announcement on the front page.)


What happened? Shouldn't the software disallow multiple submissions of identical URLs?


It does. We probably changed the url of the other thread; I don't remember (there have been so many), but we usually add a comment indicating what we did.

On the other hand, the duplicate detector is also quite porous—in most cases a slightly different URL will get through. That's by design: we want the best stories to have multiple cracks at the bat. It's easy to abuse, of course, so we ask people not to abuse it. A small number of reposts is ok.


Guys, I'm not sure if anybody's noticed yet, but call it a co-incident or what(make the "what" "copy"), but, another programming language with near similar features already exists, though its not C based and some other stuff is quite different but, yeah, see this : http://www.linux.com/news/featured-blogs/200-libby-clark/725...


Looks like the xcode beta is only available to members who paid $99 :(


I started reading the Swift Tour and couldn't stop. It's compiled, and has both functional and object-oriented features, and a nice syntax. I'm sold.

https://developer.apple.com/library/prerelease/ios/documenta...


The Swift language resource center is in the works at http://swiftlang.eu - right now it redirects to the Apple website.

Meanwhile, there is the Swift eBook at http://book.swiftlang.eu


I can't find anything in the book or on the website about concurrency. I'm not familiar with the Apple programming ecosystem, how is concurrency handled? Is the lack of language-level support a concern or is everything shuffled off into libraries and the runtime?


Love the "Done. Sold. Have me." comments when no one here has even used the language yet...


This is exciting. I can see myself getting into this. Dabbled with Objective-C but it just didn't excite me.

If Apple's intent is to boost their developer base, this is one tremendous boost. It seems to have the best of both dynamic and static languages.


For those of you who can't access the book because you don't have an Apple device I've uploaded screenshots of first chapter here.

http://imgur.com/a/AuzGw

I did it because the book was free.



Feels like dynamic languages coupled with some smalltalk resemblance, plus the playground which is kind like Mathematica? Looks pretty awesome! I'd itchy to try it out...


Direct Link: https://developer.apple.com/swift/

The guides/reference link doesn't work yet...


After read some documents I think swift is a little like coffeescript but still contains some Go syntax.

It's like a scripting language very much. Quite amazing isn't it?


How difficult would it be to have that playground preview for other langs? Im willing to bet there is someone building a sublime extension right this minute


Haven't had a chance to look at the docs for it yet, but will LLVM be the compiler for it and will it support compiling Swift into its native bytecode?


Yes, it says so on the home page:

> Using the high-performance LLVM compiler, Swift code is transformed into optimized native code, tuned to get the most out of modern Mac, iPhone, and iPad hardware.


Yes. It's on the front page: https://developer.apple.com/swift/


Does this means that they're ditching Objective-C?


No. Swift works along side Objective-C. You can use both in the same project.


That'a also Microsoft said about VB.NET when they introduced C# in early 2000. Now C# is a much more dominant language than VB.NET. It's a matter of adaptation . Something it take a long time. But seriously, how could Apple introduce a new programming language that would be possibly worse than objective-C to master? I don't think so if it's not light years better than OC. Perhaps better is a relative term, but from the syntax, new Swift definitely has a modern objective language feel, and should pose much less learning curve to newcomers. That's certainly a welcome sign.


Strangely I'm one of the people that loves the objc syntax. It's very verbose but that also makes it very simple to understand. Same goes for nested square brackets, they make it pretty simple to see how things are working. I'll definitely be trying Swift though.


Ugh, none of the links work. :( Can't get the ibook, can't view the "guides and reference", can't download xcode 6 beta.


Seems like some features of the dev center are down [1] including software downloads.

[1]: https://developer.apple.com/system-status/


xcode 6 beta d/l seems to be working fine now.. super slow, but working


Book downloaded fine for me


Same here


I as an Apple developer salute Swift. Yet more reasons to get jobs! Also anything that makes programming swifter is a plus.


A quick glance through the book - looks like a nice language, certainly better than some of the stuff we use day to day.


What's to complain about? It's like Microsoft finally kills VB6 and moved on to C#. Adapt or become obsolete.


I'm super excited about this. I love Objective-C but I also enjoy all the nice features of a high-level language.


https://swift.im/

Kind of looks like they took their logo too. LOL


serious question: why?


Here's a good way to answer that question: http://arstechnica.com/apple/2010/06/copland-2010-revisited/


Here is a podcast version of the link that 'bobthedino suggested.


Anyone feel like converting the epub from iBooks to a PDF/HTML page we can read more easily?


https://developer.apple.com/library/prerelease/ios/reference... (tour, language guide, reference links, etc. at the bottom of the page)


Give the torrents an hour. It'll show.


Where are the low level lightweight concurrency/parallelism features?


swift-lang.org mentioned at the bottom of the page seems to be down.


It's an unrelated language that is being hammered by all the people Googling "swift programming language"


I wonder if this brings us one step closer to developing on iOS...


Why is this platform not JavaScript based (so we can leverage the largest ecosystem in the world) or Python based or anything-else-that-exists based?

In other news, has Android killed iOS yet so we can stop worrying about Apple? Can't happen soon enough.


If you take a look at Swift, a lot of the different constructs are implemented similar to how they would be in languages like JS or Python.


I think that's my point. Why not JavaScript then?

The only reason I can see is vendor lock-in.


I zipped .html + .css from the book - here you go guys :)

https://www.dropbox.com/s/nuxcbkjp7bpp7uc/swift_book.zip


This is truly a game changer for me. Finally, I can develop for ios/osx without the excruciating pain and torture of working with the antiquated and ugly syntax of obj-c.


Looks like PHP (or any c-based lang). Exciting!


I just returned to my IM client (did miss the swift live stream announcement) and read: "Oh, cool, new language. And it has a REPL"

And all I thought was: "Please let it be a Lisp".


I guess you gotta go with what your customers (developers) would be most comfortable with


"Swift eliminates entire classes of unsafe code. Variables are always initialized before use, arrays and integers are checked for overflow, and memory is managed automatically."

Lol


I'm happy today.


In what way is it innovative? Seems like a mix of recent features.


a better version of ipython notebook!


But without the NumPy/SciPy/etc. ecosystem?


The Swift lang syntax looks like a mixture of JS 6, Go and Object-C/Smalltalk - at least from the first sight.


Am I the only one who thinks the name "Swift" sounds a lot like "Dart"?


This is completely unrelated to Swift, the Jabber IM app (and lib): https://swift.im/

Edit: I pointed this out as I'm curious about trademark/logo clash.


"...and you don’t even need to type semi-colons."

As an extremely paranoid & defensive Javascript developer, you shut your damn mouth!! :p /jokes


So they copied this idea for the IDE?

http://www.lighttable.com


Well, LightTable was inspired by Bret Victor's ideas. He worked at Apple earlier.


Seems a lot more like a call back to the Smalltalk roots of Objective-C.


I think they were thinking about this even earlier: http://vimeo.com/36579366


I cannot be any happier that they did.


Was my very first thought, too. The next thought was Bret Victor. Yeah.




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

Search: