Slashdot Mirror


Google Engineer Decries Complexity of Java, C++

snydeq writes "Google distinguished engineer Rob Pike ripped the use of Java and C++ during his keynote at OSCON, saying that these 'industrial programming languages' are way too complex and not adequately suited for today's computing environments. '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. They're oversold, and used far too broadly,' Pike said. '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? [This sort of programming] is very bureaucratic. Every step must be justified to the compiler.' Pike also spoke out against the performance of interpreted languages and dynamic typing."

27 of 878 comments (clear)

  1. Missing context... by Akido37 · · Score: 5, Insightful

    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.

    Oh, so he's pushing a competing product and denigrating his competition? Nothing to see here, I think.

  2. Alternative Summary by bigsexyjoe · · Score: 5, Insightful

    Google Engineer promotes Google language Go and claims it addresses weaknesses of existing languages, including Java and C++.

  3. "Google Engineer" ... seriously? by John+Whitley · · Score: 4, Insightful

    How about "Rob Pike Decries Complexity of Java, C++" instead?

    |Rob Pike| >> |Google Engineer|

  4. A man after my own heart by Brett+Buck · · Score: 5, Insightful

    These sorts of languages (and the underlying religious cults they bring with them) are probably appropriate for some uses. But what I see done in my life-critical real-time processor applications borders on criminal. Data hiding? How the f'ing hell do I check what is going on to the bit level is some twit determined to "hide the data". This is particularly apt right now, because we are adding a feature to our code that was almost trivial to add to our FORTRAN simulations, and because of the "cult of classes" C++ programming it's damn near impossible in the final product, and completely impossible to look at and tell what the heck it's doing. Trying to test it like a black box is never going to get to the level we need.

          We started having peer reviews of the code, and my colleagues and I are the designers of the system, so we would hypothetically need to sign off on it. We went for two hours to get 10 lines into it, no one could explain how it was working but that we should just "trust the compiler". That didn't fly with us, so the solution was to *not have us present at the peer reviews* since we were "disruptive"

        What we need is someone that can write straightforward procedural code, but no one seem to be willing or able to do it any more. It has all the features of a cult or a secret society, even when you get someone to understand and agree, they won't deviate from their dogma.

    1. Re:A man after my own heart by ultranova · · Score: 4, Insightful

      But what I see done in my life-critical real-time processor applications borders on criminal. Data hiding? How the f'ing hell do I check what is going on to the bit level is some twit determined to "hide the data".

      You read the code of the class that the data belongs to. You can be sure that what you read is the only thing going on because no other code can do anything to the data since it's hidden from it.

      This is particularly apt right now, because we are adding a feature to our code that was almost trivial to add to our FORTRAN simulations, and because of the "cult of classes" C++ programming it's damn near impossible in the final product, and completely impossible to look at and tell what the heck it's doing.

      Well, high-level languages generally make it impossible to figure out what's really going on behind the scenes. That's intentional: abstracting away details is the whole idea of a programming language.

      C++ is particularly bad here because it mixes high- and lowe-level abstractions and allows you to redefine basic operations (such assignment, +, etc.). Combine that with manual memory management and lack of bounds checking and you have a rather explosive combination.

      What we need is someone that can write straightforward procedural code, but no one seem to be willing or able to do it any more.

      We went for two hours to get 10 lines into it, no one could explain how it was working but that we should just "trust the compiler".

      If you are using a compiler, you have the choice of either trusting it, or inspecting the machine code it generates by yourself, which is harder than simply writing the damn thing in assembly to begin with, and thus defeats the whole point of using a compiler.

      If you want straightforward procedural code, use C. Using C++ for procedural code is pointless, and simply adds unneeded complications.

      It has all the features of a cult or a secret society, even when you get someone to understand and agree, they won't deviate from their dogma.

      It could simply be that they disagree with you. Your earlier bit about data hiding making it more difficult to figure out what's going on makes it seem that you don't understand the idea of object-oriented programming, so of course it would seem like a "cult" to you.

      It could also be that you're trolling. In that case: bravo sir, you truly have the art down.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  5. Re:Summary: by BitZtream · · Score: 4, Insightful

    Whats better is if you take a look at his history of 'inventions', you find one or two things that eventually, with the help of others, turned into something that other people use.

    His personal list of inventions looks like a list of 'things no one gives a shit about'.

    His list of Wikipedia quotes are golden. I think there was one on the list that didn't make him look like a total douche.

    He's one of those guys that thinks everything sucks except what he's made ... unfortunately, the entire rest of the world feels pretty much the exact opposite.

    Looking at his history, I don't think he'll ever say anything bad about Go, he'll just continue thinking it was perfect and that it failed because everyone else wasn't up to the task of using it.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  6. And everyone at Google now speaks Esperanto by Call+Me+Black+Cloud · · Score: 4, Insightful

    How many words are in english? A lot. (According to the OED folks, "The Second Edition of the 20-volume Oxford English Dictionary contains full entries for 171,476 words in current use, and 47,156 obsolete words. To this may be added around 9,500 derivative words included as subentries.") How many words does the average native english speaker know? According to this random website, 12,000-20,000 words. So English is complex, yet just 10% of the language meets a native speakers needs (less than that as we don't use all the words we know in normal conversation...except my wife when she's mad at me, then I hear every word she knows, many repeatedly)

    So Java is complex. C++ is complex. I program in Java for my daily bread and I certainly don't use the entire language. It's only as complex as I need it to be. The complexity of my code is driven by what I'm trying to do, not by the language itself. And for code maintainability, I try to keep things as simple as possible.

  7. Re:Maybe because programmers like to be clear by lgw · · Score: 5, Insightful

    This same rant has apeared generation after generation, and often from peope smart nough to know better. It's why COBOL was invented, with syntax like.

    SUBTRACT DEBIT FROM BALANCE GIVING NEWBALANCE.

    I kid you not, Adm Hopper actually thought that would make programming easier, and she was no moron.

    Guess what guys? The reason programming is hard is because you must clearly and unambiguously state what you want to have happen. Yes, the languages could surely be better - the syntax and intricacies of C++ are pretty nightmarish, and Java only fixes some of those issues while introducing others. There's surely a better way to do resource management, and multi-threading, that are less error prone without making you give up needed control. But it's still going to be hard to solve hard problems, and you're still going to need to be very precise and detailed in describing how to solve a problem.

    Irreducible complexity is irreducible.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  8. Re:Maybe because programmers like to be clear by lgw · · Score: 4, Insightful

    UTF-8 was one moment of genius insight ("make sure the escape sequences cant be confused with notmal characters"), and the rest was trivial. The details weren't even very well thought through beyond that one clever idea: real standards deal mostly with error handling, and UTF-8 totally dropped the ball on that, leaving RFC 3629 to pick up the slack. If anything, co-inventing UTF-8 is an argument that he doesn't know much about real-world programming (Ken has of course proven himself elsewhere). Being the author of RFC 3629 (F. Yergeau) and cleaning up the mess would make one's opinions much more interesting!

    --
    Socialism: a lie told by totalitarians and believed by fools.
  9. Did anybody post this yet? by Joce640k · · Score: 5, Insightful

    The idea of programming as a semiskilled task, practiced by people with a few months' training, is dangerous. We wouldn't tolerate plumbers or accountants that poorly educated. We don't have as an aim that architecture (of buildings) and engineering (of bridges and trains) should become more accessible to people with progressively less training. Indeed, one serious problem is that currently, too many software developers are undereducated and undertrained.

    Obviously, we don't want our tools--including our programming languages--to be more complex than necessary. But one aim should be to make tools that will serve skilled professionals--not to lower the level of expressiveness to serve people who can hardly understand the problems, let alone express solutions.

    We can and do build tools that make simple tasks simple for more people, but let's not let most people loose on the infrastructure of our technical civilization or force the professionals to use only tools designed for amateurs.

    - Bjarne Stroustrup

    --
    No sig today...
    1. Re:Did anybody post this yet? by Slightly+Askew · · Score: 4, Insightful

      How incredibly arrogant. I would totally hire a semiskilled carpenter to put up a tool shed in the back yard. Not so much a NYC high rise. I would also gladly hire an apprentice electrician to put in a new overhead light fixture, but not to wire up my 440v industrial machinery.

      There's nothing dangerous about semiskilled programming, providing they are doing work that is appropriate for semiskilled programmers. I'm no more going to hire Thomas Knoll to write my company's Human Resources app than I'm going to personally apply for a job writing the next version of whatever the NYSE is using.

      --
      Public use of any portable music system is a virtually guaranteed indicator of sociopathic tendencies. -- Zoso
  10. Re:Maybe because programmers like to be clear by Shompol · · Score: 4, Insightful

    I'm sorry to say, Google is now officially my new Microsoft. Too big for their own good,

    Big != evil. While M$ uses their clout to squish the competition, bribe the government(s), and get away with plenty other unlawful stuff, Google grows mostly by providing a superior product. There is a long way before (if) they become the new M$.

  11. Re:We all know the ideal language has two function by HeronBlademaster · · Score: 4, Insightful

    We have a FoobarFactoryFactory class in the project I'm currently assigned to... yes, it's a factory that creates factories (which in turn create foobars). And the foobars are themselves generic-ish objects which can contain any number of different types of data.

    And they have the nerve to tell me one of the qualities of higher-level devs is that "they tend to make things simpler than entry-level devs".

  12. Not so sure of that... by Estanislao+Mart�nez · · Score: 5, Insightful

    Guess what guys? The reason programming is hard is because you must clearly and unambiguously state what you want to have happen.

    Even though for most people that's the first hurdle (and one that they fail), I'm not sure that this is the main reason programming is hard. I know plenty of people who've mastered the basic mechanics of doing that, and yet still don't program too well because they can't make their problem-solving ability scale to larger, more complex problems. You can understand at a fairly low level every single step that will be carried out to execute your program, yet be completely unable to write a large, modular and maintainable software system.

  13. Re:I LOVE perl! by Monkeedude1212 · · Score: 4, Insightful

    I actually think that perl is the best programming language every designed[...] perl is the English of programming languages.

    You went on to describe how Perl is great but just so you know - every one of those reasons you listed is why every multi-lingual person on the planet hates English. It's a pain in the ass to learn because there are too many exceptions to the rules or the rules aren't well defined. Look no further than pluralization. Add an S, in most cases. Oh, but if it ends in an y, make it 'ies', like skies. And for some words, that end in sh or ch or x or something, its 'es', like wrenches. Oh and for Goose, its Geese. But the plural for Moose is not meese, in fact, its just moose, not even mooses.

    We won't bother getting into Contractions or prefixes/suffixes or any of the real gritty stuff. English itself is a pain, let alone how many variants of it are across the Earth, with their own Formal, informal, and Slang terminology.

    So yeah, while the flexibility that makes Perl accessible to more programming styles is good to you, its still a a pain to learn, and one of the reasons why people are put off by it. Without a standardized way of doing things its difficult to understand exactly whats going on. Some of the most obfuscated code I've ever seen has been written in Perl.

  14. Re:C too complex? Hilarious. by clone53421 · · Score: 5, Insightful

    One of C's great advantages is not only that it is simple and very fast, it is also very close to the hardware -- when you make local variables, structures, assignments, etc... you have a good idea what the compiler needs to do. Likewise control structures, statements and so on.

    That’s exactly the point... it’s too close to the hardware. Yes, it gives you really fine-grained control over what happens, and you can tweak it to make it as fast as possible. With the speed of today’s computers, though, you shouldn’t (usually) need that amount of optimization. Plus, the compiler should be robust enough to optimize the program nearly as well as you could anyway.

    You don’t want to tell the computer every nitty-gritty detail. The computer is fast enough and powerful enough to do what you want it to do without you needing to exercise that level of control over how it actually does it. You just want to call a function that does what you want without worrying about the underlying hardware or algorithm that does it.

    As programs get more and more complex, more and more abstraction is needed between the programmer and the hardware. This is not surprising. Someday, instead of saying “that’s like coding an entire application in assembly”, we might be saying “that’s like coding an entire application in C++”.

    --
    Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
  15. Re:C too complex? Hilarious. by bonch · · Score: 5, Insightful

    C's closeness to the hardware is probably why it has stayed relevant in the era of mobile computing and battery life. Some developers do need to tell the computer every nitty-gritty detail.

  16. Re:C too complex? Hilarious. by rolfwind · · Score: 5, Insightful

    "Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."

  17. Re:C too complex? Hilarious. by bbn · · Score: 5, Insightful

    This is because a C fragment turns into something very efficient

    No it _can_ turn into something very efficient. But usually it is too much bother or the programmer is not competent enough and the program ends up being no more efficient than something coded in a different language.

    Take a look at the programming language shootout. The C programs usually win the contest, but they do it by doing crazy things like looking up the cache size of the CPU and implementing their own version of malloc to fit a page size. The run of the mill C program is not like that.

    For many or even most tasks stability and security is more important. Other languages provide those properties better than C.

  18. Re:Understatement of the year by Bright+Apollo · · Score: 5, Insightful

    Pike and Thompson are not computer scientists, they are practitioners. The difference between Thompson's contributions and Knuth's contributions, for example, illustrate this exact point.

    --#

  19. Re:umm... by ultranova · · Score: 4, Insightful

    But this means that the programming languages of the future will be less imperative and more functional.

    No, that means that the programming languages of the future will be subjective: the computer will interpret your commands in the light of whatever other data it has. This, of course, requires artificial intelligence, and slowly but surely phases away the whole job of programming as a separate skill from commanding people.

    In other words, the ultimate programming languages of future will be known as English, Chinese, etc.

    --

    Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  20. Re:C too complex? Hilarious. by Like2Byte · · Score: 4, Insightful

    This is exactly the reason I program in C and C++. Because it is hard. The level of knowledge required for entry into my field is higher and I am therefore surrounded by more competent engineers.

    Anyone complaining that C/C++ is too hard needs to stay in GUI application and web development. Have fun, I say.

  21. And video games by Sycraft-fu · · Score: 4, Insightful

    Very hard to find a main stream game that isn't written in C++. What with Ms pushing XNA and some other stuff like that there may start being a few more written in managed languages, but C++ still reigns supreme. Why? Speed. You can write some real efficient (from the processor's point of view) code if needed, but it still has higher level functions like being OO and the boost libraries to make thing easier.

    Even on games made to be extensible, C++ is usually at the core. Civ 4 is mostly XML and Python. Pretty much all data is stored in XML, and the interactions of that stored in Python. However, the game engine is written in C++, as is the AI's DLL. The game core maybe you argue that is because they didn't want people messing with it but the AI they released the source code for. It is C++ because speed is essential.

    Some programmers love to whine about C and C++, but they endure for many reasons. I'd also point out they form the core of most OSes. Linux is written in C. The Windows kernel is written in C, the higher level API/ABI stuff in C++ and only some of the user stuff in .NET. OS-X is again C and C++ at the low level, and Objective-C higher up. All of this is not coincidence.

  22. Re:C too complex? Hilarious. by 19thNervousBreakdown · · Score: 4, Insightful

    The vast bulk of your argument is dedicated to defending C, which he never mentioned and only an imbecile would call the core language rules complex.

    C++, which you barely mention, on the other hand, is extremely complex at its core, mostly due to its templating language--which, by the way, is one of the very best features of C++, and although it could be (and will be in C++0x (0x more like 2x amirite)) done better, I think the expressiveness is well worth the complexity. Again, only an imbecile would call C++ simple.

    The real question to ask when somebody chooses to bash C++, however, is "what are you selling?" In this case, he's fairly up-front about it--he's selling Go, Google's pet language. To that, I say, "I'll believe it when I see it." Right now Go is a bunch of "but just look at the groundwork we've laid down! This will be great when it's done!" As the article mentioned, that may be true, but its complexity will approach C++ as its capabilities do. It's just hard to do a lot of stuff well, and for all the complaining, C++ does do a lot of stuff, and it does most of it well, or at least ... eh, pretty good.

    Honestly, look over the C++ challengers: every one I've ever seen that's squarely aimed at taking out other languages is little more than an ego project. I have yet to see a language that actually introduces new capabilities without significant downsides compared to what they're trying to replace, so I'll keep doing what's worked for me the last 10 years I've been a C++ fanboy: wait for something that's actually better to come out. Smugly.

    --
    <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
  23. Re:C too complex? Hilarious. by sjames · · Score: 4, Insightful

    C is very much a relevant language with a strong niche for modern use. It's very good at what it does. It is a mid-level language and it shines at that sort of use.

    Note that he was complaining specifically about C++, not C. It's not even necessarily the language itself, but the patterns and APIs that are inspired by the language that matter.

    When you need a higher level language than C, C++ is NOT a great answer. It's a series of bolt-ons for C that try to make it something it is not.

    Meanwhile, java started out badly with silly marketing claims that it never quite lived up to, still manages to perform poorly in practice and has been dogpiled with a bunch of alphabet soup such that if there is a lean and mean language in there somewhere, we'll never find it./

    So it's not at all C that is too complex, it's those horrific messes we call programs written in C++ that are too complex.

  24. There are decent languages. by hendrikboom · · Score: 4, Insightful
    In the 70's, I wrote a parser generator. It was about 1000 lines long, and it took 25 tries to get it past the static checking of the compiler. After that, it ran correctly the first time I got to run it.

    The language it was written in was Algol 68. What contributed to my success was an expressive static type system, and garbage collection. Unless you specifically turned run-time checking off, you could not break the run-time system.

    Oh, and did I mention that the compiler generated low-level efficient code as well?

    But there are few Algol 68 compilers around these days.

    Looking to what *is* available nowadays, have a look at Modula 3. It's not my favourite style of syntax, but programs written in it tend to run fast and be easy to debug. Again, most of the bugproofing lies in the static checking and garbage collection. And it's a systems language. It has been used for implementing OS kernels and the like, as well as application programs. It's my language of choice at the moment. Get the CM3 implementation. Follow the link in the Wikipedia article.

    Another attractive language is OCAML. I haven't much experience with it, but it seems to share the behaviour I've grown to love with Algol 68 and Modula 3. If anything, though, OCAML does too much automatic type inference. This leads lazy programmers to forget to mention types at many strategic code locations. making the code unnecessarily obscure.

  25. Do you know who Rob Pike is? by Demena · · Score: 4, Insightful

    Do you know who you are dissing? Did you read the article? No, and no. He never said anything against C, he said C++ was too complex not C. So you echo him and slag him off over your misreading at the same time? One of the founders of your profession? Standards dropped? Yep, sure. But whose?