Google executive frustrated by Java, C++ complexity

Google's Rob Pike makes the case for simpler programming languages

Today's commercial-grade programming languages -- C++ and Java, in particular -- are way too complex and not adequately suited for today's computing environments, Google distinguished engineer Rob Pike argued in a talk Thursday at the O'Reilly Open Source Conference.

Pike made his case against such "industrial programming languages" during his keynote at the conference in Portland, Oregon.

"I think these languages are too hard to use, too subtle, too intricate. They're far too verbose and their subtlety, intricacy and verbosity seem to be increasing over time," Pike said. "They're oversold, and used far too broadly."

Pike detailed the shortcomings of such languages as a way of describing the goals that he and other Google engineers have for a new programming language they developed, called Go.

As an illustration of the complexity of such languages, Pike showed a few examples of C++ code. One example was of a variable declaration that stretched nearly across an entire line of the screen.

"How do we have stuff like this [get to be] the standard way of computing that is taught in schools and is used in industry?" he asked, rhetorically. This sort of programming "is very bureaucratic. Every step must be justified to the compiler," he said.

While Pike admitted that he was being somewhat facetious, he asserted that such questions still should be asked. C++ came about because of people's frustration with working with the low-level C language, and Java came about as a way to simplify C++. Over time, however, new features were added to both languages, making them more and more complex.

"Noise comes with sophistication," he said.

Pike also added that such languages were developed before the advent of multicore processing and widespread networking, so they don't easily accommodate these new environments.

Pike is not the lone Google employee expressing dissatisfaction with traditional commercial-grade languages.

At the USENIX annual conference last month, Gmail engineer Adam de Boor surprised the audience by noting that the company's Gmail service was written entirely in JavaScript, and that all of its code, around 443,000 lines worth, was written by hand.

He noted that while Java is more expressive, it is also more verbose. "At this point to me it's a matter of choice which language you use," de Boor said.

JavaScript is one of a whole batch of languages -- others include Ruby and Python -- that have been developed over the past 10 years in response to the growing complexity of C++ and Java. But while having a simpler syntax, such languages have their drawbacks as well, he argued.

These new languages tend to be slower, don't scale as well, and can harbor more errors, Pike elaborated.

The languages tend to be interpreted rather than compiled, meaning the programs written in such languages aren't compiled before running, so tend to run slower as a result. They also tend to be dynamically typed, meaning programmers don't need to specify what type of data their variables will hold.

"Dynamic typing is not necessarily good. You get static errors at run time which you really should be able to catch at compile time," he said.

With all this in mind, Pike then described Go as an attempt to fuse the best attributes of both sets of languages.

"Go is an attempt to combine the safety and performance of statically typed languages with the convenience and fun of dynamically typed interpretative languages," he said, before adding, "to the extent that it succeeds you'll have to judge for yourself."

One member of the audience, Larry Augustin, the CEO of customer relationship management software provider SugarCRM, agreed with Pike's assessment that C++ and Java have gotten too complex, although he noted that this typically happens with all languages as they grow to meet a wider range of use cases.

"The reason that these languages have grown in complexity is because the more they are used, the more errors and ambiguities we've found, and the attempts to remove those ambiguities and errors have created something more complex," said Augustin, who has a background in software engineering and programming language design.

"I appreciate his goal," he said of Pike's efforts. "The question is can he achieve his target result? or does Go [become more complex] as more people use it," Augustin said.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Topics: Development tools, Languages and standards, application development, Google, software, Rob Pike

Comments

Juergen Brendel

1

General statements about languages like "X is better than Y" are usually not helpful. As much as I like dynamic languages such as Python, there is a time and place for everything. Sometimes languages like Java may just be better for the problem or the organization or team you are working with.

In RESTx ( http://restx.mulesoft.org ) we allow component authors to pick the language that is best for the job (currently either Java or Python, Ruby, Groovy and JavaScript to follow). Those components can be mixed and can utilize each other independent of the language they are written in.

I think we can all agree that C++ and Java have certain complexities. And we can see that languages like Python and Ruby are more concise and allow you to get stuff done more quickly. But the complexity of languages like Java and C++ sometimes serves useful purposes.

anon

2

Perhaps the google devs are just not smart enough to write more than a hello world program.

Moof

3

Or, well, just use Common Lisp.

Christian

4

It would be interesting what Google is thinking about Scala. I think that Scala reduces complexity through relatively few but very powerful constructs. There are no special operators like "+, -, *, /" but only methods, for example. Scala supports functional programming and thus avoids the need for heavy annotation usage and reflection magic.

Take a look at Scala!

Nick

5

If only more of the world knew about REBOL: http://re-bol.com

Naos

6

Scala is the answer. I think we don't need Go since we have great virtual machine like JVM with awsome static typed language like Scala on top of it.

Scala is as fast as Java, which is pretty fast, and it have many advantages:
- It's a lot less verbose than Java
- It supports functional programming, functions are first class citizens.
- Since it runs on JVM, it has great platform support, great threading support, stability and scalability guaranteed by mature platform which is JVM.

Oh and I'm Python developer by the way ;) I'm also looking forward for PyPy ;)

Roshan Shrestha

7

I believe Adam de Boor was talking about the GMail client, which was written in JavaScript "by hand" as opposed to being written in GWT (in Java, then compiled into JavaScript).

The server side code is probably written in Java, or C++ (or a mix).

tz

8

Part of the problem is the problems are complex. It would be nice if I could have big muscles and no fat around my waist without more exercise or controlled diet.

I would agree on C++ with one caveat, and Java to the extent that after AWT it bloated without being more functional. I code C++ as C with using whatever language extensions are useful, but no more, e.g. not replacing A=B with setvalueofA(getvalueofB()) with appropriate try/catch blocks for the exceptions.

Good code is clear and beautiful. It isn't even hard to write, but takes some skill.

Also there is the matter of how close to the hardware - I doubt they will change the Linux kernel in their whole cloud from C.

Also speed is important for my netbook or phone/tablet. Fancy ultra-high level interpreters might be nice, but not when it takes a minute to respond.

Comments are now closed.

Latest News Articles

Most Popular Articles

Follow Us

GGG Evaluation Team

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell

LIFEBOOK UH574

The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi

STYLISTIC Q702

The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott

STYLISTIC Q702

My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Resources

Best Deals on GoodGearGuide

Compare & Save

Deals powered by WhistleOut
WhistleOut

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?