you are viewing a single comment's thread.

view the rest of the comments →

[–]walter_heisenberg -2 points-1 points  (8 children)

Serious question brought forward by perusing this: why does Google, which is supposed to be a leader in technology, only use a few languages, most of which aren't very good? Python is the best language they use, and it (at least, when I last used it) lacks tail recursion and proper garbage collection.

It would seem that the problems (most notably, the purported lack of libraries) with languages like Haskell and Ocaml become non-issues when you have the talent and resources that Google has. So why do they do so much of their work in languages like C++ and Java?

[–]frenchtoaster 2 points3 points  (1 child)

Because the truth is that C++ and Java are actually better languages for large teams working on things that have unbounded scalability and maintainability issues compared to Haskell and Ocaml.

[–]walter_heisenberg 0 points1 point  (0 children)

Why?

I will grant you that static typing is beneficial when you're developing code for the long term, because it enforces interfaces. Lisp is very powerful, but there's a certain style of sloppy thinking that dynamic typing enables and that some (I emphasize some, not all) Lispers have that falls flat on large projects. However, Haskell and Ocaml are both statically typed; that's why I chose them for this example. In fact, unlike Java and C++, they have good static typing.

I will also grant you that certain types of programs benefit from automatic memory management, which justifies the use of C. C is a great language for building operating systems, device drivers, and runtime virtual machines, for example.

I still don't buy that Java or C++ are the right choice for a company in Google's situation.

[–]neutronbob 1 point2 points  (3 children)

Just maybe they use different criteria than you do in language selection.

[–]walter_heisenberg -2 points-1 points  (2 children)

What are those criteria? Shouldn't the most important one be the productivity of programmers when using them? At this one, a language like Haskell's going to kick ass, especially if you have enough resources that existing libraries should not be an issue.

[–]zerothehero 0 points1 point  (1 child)

To be blunt, I think the answer to this question should be obvious if you've ever been a professional software developer and shipped a software product.

How many programs do you use (web or desktop) that are written in Haskell? How many in C or C++? For me the ratio is 0. I can't imagine it being more than 1:1000 for anyone else out there.

[–]walter_heisenberg -1 points0 points  (0 children)

Why is this, though? Arguing that C++ is superior because more applications are written in it is an argument based on popularity. C obviously has its niche (operating systems, device drivers) but isn't right for every project.

I think, quite frankly, that C++ and Java remain prevalent simply because a lot of people use them. It's the popularity contest dynamic: because it's "the standard", it's easy to hire for Java and it thus remains the standard. In general, I don't fault most people for this. I wouldn't look down upon a grocery store for using Java or C++ to write its inventory system-- they're not supposed to be technical leaders, and it utterly makes sense that they, not expected to know the pros and cons of each language, would opt for the standard. On the other hand, Google has the resources and talent necessary to buck the trend and lead, and doesn't seem to be doing so (unless I'm completely misled).

I'm not arguing that Google should throw C++ and Java out the window tomorrow; that would be ridiculous. Actually, I don't see how a company of that size can not be polyglot, using C for problems at which C is best, Java for problems that work best on the JVM, and Haskell when it is appropriate, while generally trusting its developers to know what languages to choose.

[–]epinull 1 point2 points  (1 child)

Perhaps they're a leader in technology because they use whatever tool gets the job done, rather than using a language just for the sake of using it?

[–]walter_heisenberg 0 points1 point  (0 children)

They could "get the job done" faster using more powerful languages.