Live data from Hacker News

Chris Lattner on Swift

nondot.org

131–140 of 203 posts

Re: Chris Lattner on Swift

#131
post #116

Earlier quoted context omitted.

C++ can be just fine. It can also be used to write software bad enough to quit over, that dozens of people will maintain for decades. And they talk about it. I don't think Objective C has that problem.

To be fair, Objective C hasn't run billion dollar companies for decades yet either (in mass).

Objective-C up until the last couple years was powering the payments infrastructure for the Apple Online Store.

Re: Chris Lattner on Swift

#132

Earlier quoted context omitted.

As kryptiskt mentions in a separate comment below, its not that go's designers ignored language research. Rather, its that they took a decidedly minimalistic approach to language features. What really surprises me is that Apple didn't put any concurrency features into Swift. Having a language with better block/closure support will certainly help, but imagine what they could have done with some additional work. Would…

Apple has Grand Central Dispatch. It seems that Swift plays well with it, and I won't be surprised if more concurrency-model-as-library stuffs pop up in the future. It's a sound approach and avoids tying the language itself to any singular model.

If you see my comment above [1] I've got an example of just how nicely GCD/libdispatch works with Swift. It's quite exciting really.

[1] https://news.ycombinator.com/item?id=7844219

Re: Chris Lattner on Swift

#133
post #28

Earlier quoted context omitted.

The language has nothing from Go. Almost all Go features exist in languages since the early 80's, outside the C family.

Yeah? Interesting. Because all popular languages that I've used, up until Go, fail at concurrency at such a basic level, that it's almost as if their authors don't understand what concurrency is . Except Erlang. But then again, I said popular. C/C++/Ruby/Javasscript/Python/Java/C# - all fail miserably, utterly and completely at concurrency. What Go accomplishes with channels, goroutines and the "select" statement has…

Surprising, but nonetheless true.

Re: Chris Lattner on Swift

#134
post #78
post #76

Earlier quoted context omitted.

Which languages that can produce a high performance 3D game wouldn't be able to also produce a social media application?

C++ would be absolutely terrible for social media applications. There, the barrier isn't usually the speed but correctness and maintenance overhead.

And Swift would be equally terrible for a high performance 3D game. (It's not because the guy from Apple said it that it's true.)

There's a reason why every single AAA studio uses C++ for their engines and titles. And that's the same reason why it is terrible for social media applications.

Re: Chris Lattner on Swift

#135
post #28

Earlier quoted context omitted.

The language has nothing from Go. Almost all Go features exist in languages since the early 80's, outside the C family.

Yeah? Interesting. Because all popular languages that I've used, up until Go, fail at concurrency at such a basic level, that it's almost as if their authors don't understand what concurrency is . Except Erlang. But then again, I said popular. C/C++/Ruby/Javasscript/Python/Java/C# - all fail miserably, utterly and completely at concurrency. What Go accomplishes with channels, goroutines and the "select" statement has…

Go's gouroutines trace back to the Modula-2 co-routines and Ada tasks, just to cite two possible examples.

Go's channels make use of CSP theory which had as first implementation Occam.

Re: Chris Lattner on Swift

#136

Earlier quoted context omitted.

> I've been programming for 30 years and have written code that is in every Linux distro A very strange argument from authority considering Ken Thompson is one of Go's designers... Considering the fact that 700 people attended the inaugural Go conference, and the variety of speakers ( http://gophercon.com/schedule/ ), I think it's safe to say that Go has gained traction far beyond the Google employee and HN "bubbles"…

The argument of authority of Go designers is actually my point. By designing the language in public (even before having source available) they now don't want to admit their errors, and neither do their supporters, because they are authorities, supposedly. I'm thinking of Pike in particular. By keeping these discussions private, the Apple team did not need to protect their egos or their authority. We do not know who i…

The Go team has admitted several errors publicly (e.g. var binding for range loops, some standard library design) on multiple occasions. Those errors won't be changed because we consider preserving backward compatibility more important. You could say that holding on to backward compatibility is "defensiveness and stubbornness", but it's really just making a different decision to what you may have done in the same situation.

In fact, your premise is almost entirely incorrect. Probably 95% of Go's language design happened before it was open sourced, so it's in exactly the same situation as Swift. The Go language hasn't changed a lot since November 2009.

Re: Chris Lattner on Swift

#137

I feel like swift is really a good view on the future of programming. And it seems that in the future we have really two different kind of software engineers. As we make programming mainstream and easy, we will see some new people able to use langages like swift and dev good apps without having the slightest idea of what is happening underneath. We used to have at least a common background between software engineers…

Off the top of my head the only times not knowing what's going on at the layer below has been a problem:

1. The layer below has a bug that manifests at the top layer. You're not sure if your code is broke or if the stuff your code is built on is broke. I see this a lot in the Java world where people use frameworks / libraries they're sometimes not even aware of they're using and it has a bug.

2. You run into performance problems because of the things you're using at the layer below you. C++ STL containers is a good example. It's pretty much black-magic, have you ever looked at the implementation? I also see this a lot in the Java enterprise world. One of the selling points of Java is that it's monkey-coder friendly. Except when it breaks and the monkey doesn't know how things work under the hood.

Other than that, you should be fine not knowing the layer below you.

Re: Chris Lattner on Swift

#138
post #10

Chris demonstrated Swift and Playgrounds at WWDC 2014: "I can build anything with Swift... from a social media application, all the way up to a high-performance, 3D game using Metal." https://www.youtube.com/watch?v=nKMAV6owYh4#t=6436 He wrote this chapter (entitled LLVM ) in the book, "The Architecture of Open Source Applications": http://aosabook.org/en/llvm.html * * * On the general topic, I wrote this [1] a littl…

Did he mention anywhere Swift will be open sourced, the way LLVM has been? If not, why?

Does it really matter ? While I think Swift is an amazing language, it would be much less useful outside the closed ecosystem of Apple. The same thing happened to C#, it never really took off outside Windows.

Re: Chris Lattner on Swift

#139

Earlier quoted context omitted.

Not trying to be rude, but if you've tried and actually FAILED to learn Objective-C multiple times, then you will have a much bigger problem with actually learning the Cocoa framework yourself. Objective-C does have a non-standard syntax, but its barrier of entry for actual learning is purely psychological and not technical.

Maybe the mistake could lie in starting with Objective C without first learning C? I'm thinking that a reasonably solid C foundation helps a lot in understanding why and how Obj-C works.

I learned Objective-C before I learned C, back in the early 90s. Before that I'd learned Basic and Pascal. Objective-C clicked with my brain pretty easily.

Re: Chris Lattner on Swift

#140

Earlier quoted context omitted.

As an example, OKCupid uses C++ and runs on a custom webserver. http://www.okcupid.com/about/technology

I don't understand. Why would you make everything in-house especially for site like Ok-Cupid which is not exactly used to power rocket engines.

They did a blog post on it that I can't find right now. Essentially, they made it quite a while ago (2002? I don't recall exactly), and all other options were too slow. Their backend apparently has to do a lot of work calculating match scores when users search.
Post reply on HN