Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Way to get someone sacked at apple.



Why shouldnt someone at apple use Go.

Servers/scripts/etc are not their usual focus and they dont really have an internal language that fits better. Go is pretty good at this kind of things.


I like Go, but fail to see how Swift and C++14 don't fit the bill as well.

EDIT: changed to a more constructive comment.


Any Turing Complete language would "fit the bill", obviously.

What's wrong with a company not just kicking the tires on another language, but using it on a big project? That's how you design better languages of your own.

"Go was great, except for X and Y" leads to improvements on your own stuff.


"I like X, but i fail to see why Y and Z don't fit the bill as well."

Try repeating your point for any order of X, Y and Z, and you might realize it isn't really a valid reason for them to have used Swift or C++ instead.


Apple owns C++ and Swift compilers.


Your original argument was that C++ and Swift fit the bill as well. Now, as far as I can tell, you seem to be saying that C++ and Swift are better choices because Apple owns compilers for them. That is a different argument, which is in direct conflict with the one I originally responded to. My response was based on the assumption that you meant what you wrote.

Anyway, onto your current stance. That Apple don't use Swift or C++ for their spider seems to indicate that the benefit of using Go outweighs the benefit of using a language they own the compiler for. Go has a BSD-style license, so as far as Apple implementing their own changes and doing whatever they want with the source code and their own binaries at will goes, they might as well have owned it. Go is also seems like a no-brainer choice for a web spider since it has concurrency modeled in such a straight forward and cruft free way.


lol,i'm not sure why anybody would be sacked because "Google product" ;) however,I wonder why they didnt use Swift,and it's a question.


The most likely explanation for not using Swift is the employees who worked on the crawler simply didn't know it existed. From what I've heard, only a select few at the company knew it was in development and a number of Apple employees were noticeably shocked during the WWDC keynote when it was announced.

Apple actually uses a bunch of 3rd party developer tech on the server-side and on the web. They use Rails quite a bit I believe and are starting to use Angular.js too.


It's not as mature. Doesn't have the library and third party support. Does Apple use Mac OS for all its servers? They use Azure for some servers? That would imply they need the language to be cross-platform.


I can vouch for this-I've been trying to import CommonCrypto, and instead of just typing "import CommonCrypto" I have to do some sort of "bridging header" stuff with a .h file that just seems totally backwards to me (I don't have Cocoa or Obj-C experience). It feels very not quite ready for prime time.


Given how it interoperates with Objective-C runtime, I would say it already has lots of libraries to choose from.


Swift was designed for coding user-facing applications, not internet utilities.


Swift was designed to do everything - one language to rule them all. To quote from Apple's Swift page: "Swift is a successor to the C and Objective-C languages."

My guess would be that the webcrawler was started before Swift was allowed to escape from the Developer Tools enclave.


Doing everything is not the same as doing everything well.

Surely you agree that languages designed with one purpose in mind (a la Go and networking/server development) can reasonably do better at that purpose than an explicitly general-purpose language?

Just to be clear, I prefer Swift to Go in general. However, between the two, I would personally prefer to use Go for the development of network utilities.


I'm not saying it's a good idea, I was just responding to your assertion that Swift was designed only for writing user-facing applications. That is not the case - this is Apple's planned replacement for low-level code as well as apps. It is this design requirement which drove Swift's abandoning Objective-C's dynamic bindings etc.


> Surely you agree that languages designed with one purpose in mind (a la Go and networking/server development) can reasonably do better at that purpose than an explicitly general-purpose language?

I don't think that's a given. Just because a language is more special-purpose, doesn't mean that a more general purpose language can do the same things as seamlessly as in the other language (maybe they would have to define an embedded DSL, but that might be simple). Maybe the special-purpose language decided to commit to certain things in its domain - like certain concurrency features - and make it "first class", since that was its intended domain. But then maybe that concurrency feature wasn't that useful and a more general purpose language - which had to keep its options open since it was general purpose - could express other alternative features more easily.


Can you explain what that means? Which language features is Swift missing?


It's a perfectly reasonable general purpose language. However, it doesn't have a low-overhead green thread mechanism, and the standard library has no particular emphasis on network tools.

Even as an outspoken critic of go, I recognize that it has quite a strong networking toolset.


Swift is a general purpose language. I fail to see what it lacks.


So are Python and Ruby, but most people will agree that those are unsuitable for certain types of highly concurrent and performance sensitive network applications.

Using the right language for a particular domain can save you a lot of headache. Go is open source and a relatively proven choice, compared to Swift.


Python and Ruby aren't a suitable comparison, because they lack AOT compilers to native code as part of their canonical implementation, which is not the case for Swift.

As for access to the language implementation, Swift is Apple's creation.


The argument you made was that "Swift is a general purpose language.". Since both Python and Ruby are generally considered general purpose languages, they _are_ suitable for comparison to Swift in the exact sense that you chose to describe Swift.

I'm not trying to tell you that you are wrong. I'm just saying that your reasoning is flawed, and your arguments don't really support any particular conclusion. "Swift is a general purpose language." - OK? "I fail to see what it lacks." - Noted.

Let's only compare with native, canonically AOT compiled, general purpose languages, though. All of a sudden there are a lot of questions. Why didn't they write it in C? Why didn't they write it in Delphi? Fortran? Forth? The answer is of course that beyond being a native, canonically AOT compiled, general purpose language, different languages have different constructs and models of particular patterns that make them more or less useful for different kinds of tasks and development models.

Apple seemingly recognized that Swift was less useful than Go for the particular task at hand, and while we can't really know for sure if this was a matter of performance, development speed, personal preference of the developers etc, we can probably assume that the choice was based on taking several such quality dimensions into consideration.


I would expect Swift to have comparable performance to Go since it's a C like compiled language. Where it doesn't, Apple should probably dog-food it so they can find any deficiencies.


Network latency and distribution notwithstanding, one of Go's core goals is low-overhead concurrency. I'm not sure how GCD compares in Swift because I haven't spent a ton of time in it yet, but that could be a point of contention, particularly in a web scraper.


Why? This is exactly the situation, where the tool is a great match for a job.




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

Search: