Live data from Hacker News

The Swift Programming Language

developer.apple.com

771–780 of 970 posts

Re: The Swift Programming Language

#771

Earlier quoted context omitted.

> My apologies, I didn't realize that expecting a programming language to have a stable syntax, stable semantics, a stable standard library and at least one stable and robust implementation before using it seriously in industry was merely a "game" You also didn't realize that you just built the biggest strawman ever in the above sentence. Enough with the "I want a stable Rust now". Rust, like any other language, take…

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…

I can't tell if you like Rust or hate it. If you hate it, and you are right, then it will simply fade away and your comments will serve nothing more than being able to say, "I told you so." If you are wrong, then you end up looking a bit silly.

If you like it, perhaps you should be a little patient and give the creators the benefit of the doubt. No one wants a Rust 3.0 fiasco.

It's hard to encounter language issues without implementing a large project in the language. I am happy that they're taking the time to let the implementation of Servo help inform the design of Rust.

Re: The Swift Programming Language

#772
post #684

Earlier quoted context omitted.

Ruby is simple and beautiful, isn't it? Too bad it never got the shower of money from big backers Javascript, PHP and now Swift got blessed with.

Beauty is in the eye of the beholder, but Ruby is anything but simple. It has one of the most complicated syntaxes of any programming language in common use. Perl and C++ are still in the lead, but with stuff like the gratuitous introduction of alternate hash syntax, new-style lambdas, etc., Ruby is catching up.

It'll never catch C++ [1]

[1] http://stackoverflow.com/questions/23980929/what-changes-int...

Re: The Swift Programming Language

#773
post #464

Earlier quoted context omitted.

This comment surprises me. It's factual but it's not really a response to an actual claim I made. Did you really perceive that I alleged an extreme similarity to Go in my comment? If so, it certainly wasn't intentional. I just said certain features reminded me of different languages, I didn't mean to assert these languages are actually incorporated into Swift.

No, no, I don't object to your comment. You're just not the only person I've seen making the comparison to Golang, and so I had a big comment bottled up. :)

Including me, I think some syntaxes of Switft look like Go, while they actully don't share the same vision. Go tries to be a language great for system programming so it introduces channels, interfaces. But Swift want to help GUI programming and it needs the whole class system but without crazy stuffs like channels.

But for others aspects that are not related these two(class system, concurrency), I would say they look quite similar.

Re: The Swift Programming Language

#774

Earlier quoted context omitted.

Apple consistently represents a step backwards for both developers and users, in terms of engineering and freedom, but they've amassed enough capital at this point that the hope of them simply withering on the vine and dying off is probably not going to happen. At least Microsoft and Google show off their new projects and code so everyone can learn from them and read their research.

any proof to back up those claims?

http://research.microsoft.com/en-us/

http://research.google.com/

http://research.apple.com/

Hint: one of these things is not like the other...see if you can figure out which using only the power of curl.

Re: The Swift Programming Language

#775
post #382

Earlier quoted context omitted.

I don't get the hate. Yeah, syntax is unfamiliar, bu once I got used to it I began to really enjoy objective-c. Ymmv etc., but it's now one of my fav languages - though I guess this is mostly due to cocoa

You may not hate Objective-C, but I doubt you love it either. Have you / would you ever use Objective-C to write a web back-end? To write a command-line tool?

I actually really like Objective-C and would totally use it as a back end language if there were good libraries to make use of. I've also written a couple of command line tools in Obj-C.

Re: The Swift Programming Language

#776

Earlier quoted context omitted.

I'm not misrepresenting what he wrote, I'm directly responding to it. While you may not be aware with recent language development and modern LLVM-based languages in general, to me and many others what was announced at WWDC today wasn't just a set of buzzwords and marketing speak. Anyone who has been into language design and watched the keynote today can make a pretty good guess about the properties of Swift. There's…

I'd prefer to see how it fares in the real world before jumping to such conclusions like you seem to be so willing to do. You may not have been around to experience it first-hand, but we heard a lot of claims made back in the 1990s about how Java and the JVM would increase security and safety. The arguments made then even overlap with some of those being made in this case! The lack of direct pointer access and manipu…

And you're telling me... with a straight face... that Java's lack of direct pointer access, automatic memory management and bounds checking do not make it safer and more secure compared to C and C++?

You really should stop talking.

Re: The Swift Programming Language

#777
post #554

Earlier quoted context omitted.

I don't necessarily agree with the post you're replying to, but Rust is a memory-safe language without any garbage collection whatsoever. Proper unique pointers and move semantics are basically magic.

I'd be interested to know more about what you think of xenadu02's post. Practically, we can't completely stop coding in C/C++ yet, but a large class of software can be written in safer languages already, and it seems to me that once Rust is mature, we should strongly prefer it over C or C++. The security problems with non-memory-safe languages are really that bad.

We have to be realistic. C is never going away. C++ is never going away. When has any entrenched programming language ever gone away? As someone who has been paid to write code in RPG (https://en.wikipedia.org/wiki/IBM_RPG#Example_code), I can confirm: never ever, ever ever. The best that we can do is to offer an alternative.

The reason why I put so much effort into Rust is because people who need to write the software in this space have literally no alternative that is not unsafe. Even if they cared about safety, they're screwed! Say that they need to write a library that can be written once and called from any language. That means, effectively, that they need to write that library in a language that 1) can expose a C-compatible interface, and 2) can run without a runtime. Which means, practically, that their choices of programming language are either 1) C or 2) C++. Despite Heartbleed, nobody's rushing to rewrite OpenSSL in ML. And I sure hope nobody's rushing to rewrite it in Rust either (we have no idea yet how Rust would fare for crypto, and we need time to figure that out). But once Rust is ready, you will at least have a choice. Memory safety will no longer be something that you leave on the table out of necessity.

I feel like the vast majority of the new programming languages coming out these days were conceived to make programming more pleasurable for the programmer. And yeah, I'm a programmer too, and I dislike many of the languages that I am forced to use every day. But Rust isn't about making programmers happy (although it seems to do that entirely by accident); it's about making users safer. Fewer vulnerabilities, fewer angles of attack for the baddies to exploit. And hey, if it makes software crash less, I guess that's cool too.

Re: The Swift Programming Language

#778
post #740

Earlier quoted context omitted.

> Swift isn't intended to be a systems language: it's an application language. It may not be ready as a systems language in its pre-1.0 form, but the Swift book claims that it's "designed to scale gracefully from ‘Hello World’ to an entire operating system", so Apple appears to have big goals.

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)

Re: The Swift Programming Language

#779

Earlier quoted context omitted.

> My apologies, I didn't realize that expecting a programming language to have a stable syntax, stable semantics, a stable standard library and at least one stable and robust implementation before using it seriously in industry was merely a "game" You also didn't realize that you just built the biggest strawman ever in the above sentence. Enough with the "I want a stable Rust now". Rust, like any other language, take…

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…

This is silly. Rust is on a similar time frame to Go in terms of stabilization (~2.5 years after release).

It's hard to make a comparison against Swift, which is a proprietary language developed for years behind closed doors. Presumably they're at 1.0 from the first day by design. You can't do that with open source languages.

Re: The Swift Programming Language

#780

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…

Good list, I think the generics notation was inspired by C# but with the improvement of moving the generic constraints inside the 's
Post reply on HN