Live data from Hacker News

The Swift Programming Language

developer.apple.com

821–830 of 970 posts

Re: The Swift Programming Language

#821

Earlier quoted context omitted.

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

Doesn't change pages when I click on stuff here.

I had to open things in a new tab (in chrome) to see them (odd, but it worked?)

Edit: Seems to be working now anyways :).

Re: The Swift Programming Language

#822
post #590

Earlier quoted context omitted.

Possibly, but it's very handy to let immutable data be read by any thread that wants to. If, however, it's very slightly mutable due to a ref counter, you have to atomically manage the counter, even for what should be free immutable reference.

Possibly, but it's very handy to let immutable data be read by any thread that wants to. If, however, it's very slightly mutable due to a ref counter, you have to atomically manage the counter, even for what should be free immutable reference. I'm managing something like this in Go. There are no refcounts, but everything is very much mutable. I'm basically arranging for a span of time where I know nothing unprotected…

Interesting.

I still think it would be hard to apply to a ref counter app, since you'd need to keep track of change in ref count for later cleanup (thread-local per object maybe? sounds inefficient), but I now will admit that it sounds possible.

Re: The Swift Programming Language

#823

Earlier quoted context omitted.

That's really not a lot. The optional semicolons could also be influenced by BCPL or JavaScript.

Yeah, it's only the entire basic Syntax of the language they copied. Yes, Swift's semantics are different (since it's essentially a domain-specific language designed to make writing Cocoa apps faster), but syntax-wise a Go programmer feels right at home reading Swift.

If you mean by "entire" the spelling of one keyword and the omitting of parentheses. Everything else seems to be more related to C and various Action/ECMAScript like scripting languages.

Re: The Swift Programming Language

#824
post #692
post #643

Earlier quoted context omitted.

Oh hello again, Pacabel. I'm familiar with your game by now. :) We're not scared in the slightest. I'll reconsider when Swift has inline ASM, allocators, linear types, move semantics by default, region analysis, and a type system that guarantees freedom from data races (oh, and when the code is open-sourced, and targets both Linux and Windows as a first-class citizen). Swift isn't intended to be a systems language: i…

Swift isn't intended to be a systems language FWIW, Swift is categorized as a systems language in the opening pages. But, then, so does Go in its FAQ. To Swift's credit, at least it has deterministic memory management through ARC.

While having some support for garbage collection is good, reference counting is not is a rather expensive way to implement that for applications. This becomes especially bad in multicores since it may dramatically increase the number of writes to shared object cache lines.

Re: The Swift Programming Language

#825

Earlier quoted context omitted.

Well, we aren't actually seeing stabilization when it comes to Rust. Assuming this stabilization actually does happen, whether it happens in public or private is irrelevant. What matters is that we've seen C++ stabilize. We've seen Go stabilize. We've seen Scala stabilize. And now we'll likely see Swift stabilize, well before Rust does. They are all serious competitors to Rust. As these other languages continue to ev…

* Scala has been around since 2004 (public release) -- 10 years ago. (Not sure when the first stable release was but more than 3 years.) * Go in 2009 (public) -- 6 years ago. 1.0 (first stable release) was released in 2012 so it took 3 years to stabilize. * C++ in 1983 -- 31 years ago. ... It's been a long time. * Clojure in 2007 -- 7 years ago. The creator took 2 1/2 years before releasing it to the public. * Rust i…

You're probably right, but I think I've heard of Rust in public in 2010 and that it was started by Graydon in 2007.

Re: The Swift Programming Language

#826

Just glanced thru the Swift book in about 3 hours. Conclusion: all your programming language are belong to Swift, mostly stolen good ideas, some innovations, a few gripes. I can say Swift takes inspiration and improves on at least these languages: C: typealias struct control structures labeled statements AKA gotos varargs C++: default arguments class instance construction syntax // comment superclass, implementing pr…

Concurrency will probably be handled using Grand Central Dispatch's[0] queues.

[0] http://en.wikipedia.org/wiki/Grand_Central_Dispatch

Re: The Swift Programming Language

#827
post #739

I find it a bit sad that with all of the languages that already exist, Apple found it necessary to invent a completely new one -- and then make it proprietary. Why not use Ruby, or Python, or JavaScript -- or even Go, Rust, Clojure, or Scala? (Yes, I realize that the latter two run on the JVM, which would have been problematic in other ways.) Heck, they could have bought RubyMotion and made Ruby the high-level langua…

Apple is a big, rich corporation. But in that campus there are still human developers.

Radical hypothesis: what if this started as a pet project, got the attention of more employees, then management (with or without convincing from said developers). Management sees the value in the project, and funds it officially. You know, like other big, rich corporations...such as Google.

Re: The Swift Programming Language

#828
post #764

Earlier quoted context omitted.

It's interesting that inline assembly is your first bullet point, since there's nothing I can think of that ruins a code file more than inline assembly in a host language. Put that crap in a .S file and link it in like everything else, for crying out loud. The one time you need inline assembly is when you don't want to build a function frame, such as a tight loop, but come on. Also, even in systems, I can think of ab…

I'm confused that you seem to think that my bullet points are ordered from most to least important. It seems like quite a strange thing to attack! I'm sorry to disappoint you, but I do not run these comments by a team of editors first. :) That said, judging by your other comments, you seem to be of the impression that the Rust team has some sort of vendetta against Go, and have concocted a vendetta in kind. Again, I…

If you find my comments disrespectful and think I'm implying you have a vendetta, you skimmed them and are disrespecting me by putting words in my mouth. I've simply noticed a trend of most commentary from Rust contributors taking the underdog position and participating in picking apart other (ostensibly) competing languages, and I think you guys should stop doing that.

The last sentence of the comment to which you hint is my thesis. There is no subtext. It's easy to perceive negative opinions as attacks and create an adversary from the person writing the opinion, but it's also a little bit disingenuous. It also, conveniently, creates a platform upon which nobody can disagree with you lest they be hostile and aggressive. You can then exit on the "high ground," as you've done here.

I meant no ill will. Best of luck, I guess.

Re: The Swift Programming Language

#829
post #825

Earlier quoted context omitted.

* Scala has been around since 2004 (public release) -- 10 years ago. (Not sure when the first stable release was but more than 3 years.) * Go in 2009 (public) -- 6 years ago. 1.0 (first stable release) was released in 2012 so it took 3 years to stabilize. * C++ in 1983 -- 31 years ago. ... It's been a long time. * Clojure in 2007 -- 7 years ago. The creator took 2 1/2 years before releasing it to the public. * Rust i…

You're probably right, but I think I've heard of Rust in public in 2010 and that it was started by Graydon in 2007.

Rust had been stewing around in Graydon's head for years, but he was never paid to work on it until 2009 (part-time, at that point). And he didn't have any paid employees to help him until 2010 (that would be pcwalton). And as far as I'm concerned, Rust development didn't actually start in earnest until mid-to-late 2011, when the compiler began bootstrapping. And the Rust that we know and love today didn't begin to take shape until 2012, when borrowed references started taking shape.

Personally, I consider the 0.1 release in January 2012 to mark Rust's "birthday". Everything prior to that was just gestation. :)

Re: The Swift Programming Language

#830

Earlier quoted context omitted.

I'm thinking about starting the "Rust contributor points out how Rust is a systems language and $language is an applications language" drinking game. At least now they'll focus on Swift instead of Go. I don't mean this to be rude; I've just noticed a similar set of usernames in threads about certain !Rust languages playing the underdog position and always feeling like they need to compare. Given Rust's PR, speaking o…

Sign me up for a "someone gets indignant about rust developers responding to other people's comments about rust" drinking game. (small-time rust contributor here too)

I think you should look up what "indignant" means, then, for the benefit of all of us, demonstrate the anger in my comment that was not put there unconsciously by the reader.
Post reply on HN