Forgot your password?
typodupeerror
Education Google Java Programming

Google Engineer Decries Complexity of Java, C++ 878

Posted by Soulskill
from the keep-it-simple-stupid dept.
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."
This discussion has been archived. No new comments can be posted.

Google Engineer Decries Complexity of Java, C++

Comments Filter:
  • by Anonymous Coward on Friday July 23, 2010 @03:20PM (#33006388)

    No,

    What this world needs is competent programmers. C++ too hard for you? You shouldn't be programming. It's that simple.

  • umm... (Score:4, Insightful)

    by deviator (92787) <`bdp' `at' `amnesia.org'> on Friday July 23, 2010 @03:20PM (#33006390) Homepage

    "Efficient" languages are too complex. "Simple" languages are too inefficient.

    Normally I'd write this off as "duh" but this is Rob Pike.

    Oh wait, he's pushing something new that somehow manages to be easy and efficient? OK...

  • Missing context... (Score:5, Insightful)

    by Akido37 (1473009) on Friday July 23, 2010 @03:21PM (#33006396)

    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.

  • by BitZtream (692029) on Friday July 23, 2010 @03:22PM (#33006420)

    Should have RTFA I guess, I now realize Mr Pike just talks in circles and really didn't have anything of value to say other than 'programming is hard'.

  • And...? (Score:4, Insightful)

    by arth1 (260657) on Friday July 23, 2010 @03:23PM (#33006446) Homepage Journal

    And where is the news here?

    Picking the right tool for the job doesn't just cut down half the work time, but can help offset what sloppy workers do to destroy quality.

    C++, Java, perl, C, forth, and sh are all different languages, and well suited to different jobs. But when all you have is a nailgun (i.e. all you are fluent in is a single language), every project starts looking like nailgun job, including your own foot.

  • by bigsexyjoe (581721) on Friday July 23, 2010 @03:23PM (#33006452)
    Google Engineer promotes Google language Go and claims it addresses weaknesses of existing languages, including Java and C++.
  • by John Whitley (6067) on Friday July 23, 2010 @03:25PM (#33006484) Homepage

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

    |Rob Pike| >> |Google Engineer|

  • by Brett Buck (811747) on Friday July 23, 2010 @03:27PM (#33006498)

    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.

  • Re:umm... (Score:4, Insightful)

    by Bryansix (761547) on Friday July 23, 2010 @03:29PM (#33006526) Homepage
    Right. Basically what we call "High level programming languages" are not all that high level any longer and the compiler is getting off without doing enough work. The language should be simple and the "hard work" should be done by the compiler figuring out the most effecient way to get done what it is being told to get done.
  • by Anonymous Coward on Friday July 23, 2010 @03:30PM (#33006564)

    Linus has a fetish for C. He'll say anything.

  • by Anonymous Coward on Friday July 23, 2010 @03:31PM (#33006578)

    Almost everyone programming computers these days seems to be too eager to forget what the computer is actually calculating. When you are writing software that has any need to perform within certain memory or time constraints, or scale to any degree at all, you need to understand your program at that level.

    For example, for high performance searching it is critical to understand pointer arithmetic to build an effective hash table. Without that, either your substitute search algorithm doesn't scale efficiently, or you're depending on a likely-less-than-optimal generic library.

    I knew a database developer who insisted that each record in a database match the block size of the disk in use. The computer then calculated the block that contained the desired record and read/wrote only that block. Developers in high-level languages just wouldn't give a shit.

    I knew a graphics developer who looked for every opportunity to use powers of two so he could use bit-masking and rotating: rotate 1 bit right to divide by two, or XOR with 0x07 to get modulus 8, etc.

    Optimization by understanding what the computer is actually calculating is fading fast, and teaching Java at the university level only accelerates that trend.

  • by metamechanical (545566) on Friday July 23, 2010 @03:33PM (#33006612)
    What do you expect? To me it appeared to be little more than stumping for the programming language he wrote - Google Go. Which has yet to impress me. They say that it's flexible like an interpreted language but fast like a compiled one. To me, it seems like it's missing all the cool shit that makes me USE an interpreted language, but doesn't provide the same low-level access that makes me use a compiled one! All languages have their niche, I suppose, and I guess I'm just not the target demographic for Google Go
  • by Anonymous Coward on Friday July 23, 2010 @03:33PM (#33006616)

    C++ hard? No programing language is "hard" (to anyone with a three digit IQ), writing good software is hard, and that has hardly anything to do with the language or tools you use.

  • by retchdog (1319261) on Friday July 23, 2010 @03:38PM (#33006664) Journal

    It's like the old saw about asking a Christian, "Is it okay to smoke while praying?" versus "Is it okay to pray while smoking?"

    Of course competent programmers should handle C and all that. The point is, however, that the new ground to be discovered will be done by having non-programmers be able to quickly, easily, and accurately practice their craft with the aid of numerical analysis and data processing. It's the difference between doing something in an afternoon and needing to incorporate a company; pitch ideas; apply for grants/labs; &c.

    The cynical programmer will say that the easy languages will inevitably allow fuckups. Well, that's true I guess (although isn't it an interesting project to reduce these?), but in any real project there are already several categories of fuckups (often methodological/statistical) which the programmer is, usually, blissfully unaware of, and will screw the data/results on a much grander and more subtle scale.

    Here is a great example of an "empowering" language: http://processing.org/ [processing.org] Yeah, a `true programmer' may call it inefficient, but if it allows someone to do what they previously could not even conceive of, isn't this an infinite gain in efficiency?

  • Re:Summary: (Score:4, Insightful)

    by BitZtream (692029) on Friday July 23, 2010 @03:38PM (#33006666)

    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.

  • by Call Me Black Cloud (616282) on Friday July 23, 2010 @03:39PM (#33006690)
    How many words are in english? A lot. (According to the OED folks [oxforddictionaries.com], "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 [englishenglish.com], 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.
  • by oxide7 (1013325) on Friday July 23, 2010 @03:39PM (#33006694)
    It's been a long time since I've coded in a professional environment but I feel that having learned C++ you can learn any other language. It is complicated and verbose, but its extremely precise. Imagine having to learn how to manage memory with something like PHP. Actually -- because the new generation DOESNT LEARN C++ its why code is getting so sloppy now. There are easier languages sure, and using them can be fine, but if that's all you know, then you don't really know what your code is doing.
  • by Anonymous Coward on Friday July 23, 2010 @03:40PM (#33006716)

    to trust anything they say or do

    Or, maybe, instead of trusting what they say, you could, you know, RTFA and see if the arguments are valid and maybe post some counter arguments.

    I hope you know that JavaScript is one of the most used languages in the world, and that is it not controlled by Google. That in fact Google does not control Python either. And that one of the reasons JavaScript is popular is because it's accessible and easier to learn since you can start without caring about OO or functional programming. A 13 year old can just start document.write-ing his way into a webdeveloper career, print_r-ing his way through Wordpress after Wordpress site for his friends, family and local barbershop.

    Seriously, there's no conspiracy here, and comparing to Microsoft is lame in this context. (Although, Microsoft is also starting to see the value of dynamic languages lately, hmm, maybe they and Google have a point?)

  • by lgw (121541) on Friday July 23, 2010 @03:40PM (#33006718) Journal

    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.

  • by lgw (121541) on Friday July 23, 2010 @03:50PM (#33006868) Journal

    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!

  • by Joce640k (829181) on Friday July 23, 2010 @03:51PM (#33006880) Homepage

    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

  • by Shompol (1690084) on Friday July 23, 2010 @03:53PM (#33006920)

    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, [wikipedia.org] bribe the government(s), [slashdot.org] 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$.

  • by Anonymous Coward on Friday July 23, 2010 @03:56PM (#33006942)

    C. It's just the right thing to do.

  • 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".

  • by Estanislao Martínez (203477) on Friday July 23, 2010 @04:03PM (#33007012) Homepage

    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.

  • Re:I LOVE perl! (Score:5, Insightful)

    by Monkeedude1212 (1560403) on Friday July 23, 2010 @04:03PM (#33007022) Journal

    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.

  • by fyngyrz (762201) on Friday July 23, 2010 @04:03PM (#33007026) Homepage Journal

    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.

    The reason it is used is -- frankly -- because it kicks the ass of every other language out there (except machine and assembly) when it comes to both size and performance. This is because a C fragment turns into something very efficient and "close to the metal" if the compiler is even half-good, and that in turn is because what C does is very close to what the CPU does. Spend a couple weeks writing a C compiler -- just a C to ASM one for any CPU -- you'll see what I mean.

    The only sense in which C is "harder" is that it takes more statements - because they tend to do simple things - than a higher level language to do many things. A little writing, a little building your own library... you'll have a nice resource for lists, memory management, graphics, in whatever area(s) your interest(s) lie(s.) And at that point, it's not harder -- it's easy, and it's fast as hell to write, and it *will* kick the butt of most other languages, as long as the understanding of the problem to be solved by the programmers is reasonably similar.

    Also... I'm a huge fan of Python, use it all the time. Great language, totally wiped Perl out of my life (and for that, I am eternally grateful.) And as an interpreted language, it's not all that slow -- especially on a modern machine. But compared to C... no, I'd *never* use Python as a language for anything that required serious computation. You don't even need to go to C++ for some pretty cool OO - it's not only easy to do, it's educational and you'll actually understand what OO is doing, and why. If you need crazy OO, C++ is right there, and can remain efficient if you're really careful. Me, I rarely go there, but YMMV.

    That whole too complex thing... what, was he hired by Google as a janitor? Or a janitor's helper? Seriously, too complex? For whom? Is he trying to teach a German Shepherd to program? Twit. If you came to my company for a job, and you told me C was "too complex" or "too hard", I'd just show you the door.

    Have our standards really dropped that far?

  • by thetoadwarrior (1268702) on Friday July 23, 2010 @04:05PM (#33007054) Homepage
    It's not hard to learn Java but yes, it is often a complicated mess of shit when you want to use it on the web. Anything where you *have* to generate great swathes of code to keep your sanity is probably an over engineered shit solution.
  • by clone53421 (1310749) on Friday July 23, 2010 @04:17PM (#33007198) Journal

    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++”.

  • by bonch (38532) on Friday July 23, 2010 @04:21PM (#33007246)

    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.

  • by GooberToo (74388) on Friday July 23, 2010 @04:24PM (#33007284)

    Which hardly makes them immune from criticism.

    In my opinion it makes them more likely to suffer criticism. Many computer scientists, the majority I've met, seem to chronically like in a glass house and are completely disconnected from anything but theory. So if I run with the logical conclusion, in theory, made in a clean room, he's completely right. Pragmatically, almost everything he said likely to be completely wrong.

    Oddly enough, seems to more or less cover much of his and the comments and here.

  • by Slightly Askew (638918) on Friday July 23, 2010 @04:26PM (#33007306) Journal

    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.

  • Re:And...? (Score:3, Insightful)

    by arth1 (260657) on Friday July 23, 2010 @04:26PM (#33007314) Homepage Journal

    Anything that a RPN calculator does well at, forth does even better? :-)

    Due to the nature of forth, I would say that it's well suited for applications where being modular is a plus, stack space is not at a premium, initialization time is not at a premium, but execution speed from when execution actually starts (not including initialization) is important.

    Oh, and where you can take advantage of the extra rope you're given (like with C). That people are able to hang themselves with it is no reason for a hardware store not to sell rope. But the hardware store clerk should also be able to tell you when glue would be a better choice.

  • Biased much? (Score:4, Insightful)

    by Comboman (895500) on Friday July 23, 2010 @04:27PM (#33007324)
    Stroustrup (inventor of C++) is hardly a source of unbiased opinion on this topic. His elitist argument comes off sounding like "Calculators are bad because anyone can use them, engineers should use slide rules. Would you want someone designing a bridge who was too stupid to use a slide rule?" Professional programmers can be more productive if they are able to spend more time creating and less time fighting with their tools, and denying amateurs access to those tools sounds more like job-protectionism than professionalism.
  • by rolfwind (528248) on Friday July 23, 2010 @04:28PM (#33007334)

    "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."

  • by bbn (172659) <baldur.norddahl@gmail.com> on Friday July 23, 2010 @04:32PM (#33007372)

    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.

  • Re:I LOVE perl! (Score:3, Insightful)

    by Grishnakh (216268) on Friday July 23, 2010 @04:36PM (#33007422)

    If you know German, Latin, and some French, English should be easy for you. English is basically a big mishmash of several older languages, taking parts of each, but not putting them together into anything coherent.

    The main strength of English is its versatility; it's trivially easy to adopt new words from other languages like Russian or Japanese. However, adopting words from extremely different languages means that they won't fit into those nice rules that you complain are violated too much.

    Of course, we could throw all that out, and not adopt any new words at all, and only create new words for things which can fit the rules, but that would require a special Institute, the way they do with French. That hasn't worked out too well, and people aren't exactly flocking to learn French these days. They're all trying to learn English and Mandarin.

  • by Ex-MislTech (557759) on Friday July 23, 2010 @04:43PM (#33007504)

    You got modded flamebait because you dared question the less is more crowd that wants higher level languages that do
    most of the lower level work for them.

    The ppl that coded closer to the metal as you say mostly have grey hair now, and are looked at as legacy coders
    by the new breed that want all that lower level coding done for them by the language.

    As for it being complex, sure it is complex for most ppl, but for a college trained Comp Sci. major it should
    be bread and butter and tools of the trade.

    Ppl have declared we are giving a dumbed down education and I think this is a fair indicator of it.

  • by Bright Apollo (988736) on Friday July 23, 2010 @04:51PM (#33007624) Journal

    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.

    --#

  • by godefroi (52421) on Friday July 23, 2010 @04:55PM (#33007660)

    Sorry, but if you can't "think like a programmer does", you won't be able to create anything but the most trivial program, ever. The difficulty of programming isn't learning language and syntax, it's "thinking like a programmer does". That's precisely the thing that must be accomplished to write complex software, and that's precisely the thing that is difficult to do for most of the population.

    Sorry to disappoint.

  • by assemblyronin (1719578) on Friday July 23, 2010 @04:57PM (#33007694)

    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".

    Unless you're writing assembly code for non-pipeline microprocessors, you're already implicitly 'trusting the compiler' because most modern compilers will re-order instructions to help prevent pipeline stalls, or improve efficiency.

  • Re:umm... (Score:5, Insightful)

    by ultranova (717540) on Friday July 23, 2010 @04:58PM (#33007704)

    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.

  • by SteeldrivingJon (842919) on Friday July 23, 2010 @05:09PM (#33007798) Homepage Journal

    Re: method syntax

    I always liked how it was different from function syntax. Obj-C was my first OO language, and I had a conceptualization of objects as being semi-independent entities, so it felt natural to express message passing in a different syntax from 'mere' C functions.

  • by Like2Byte (542992) <Like2ByteNO@SPAMyahoo.com> on Friday July 23, 2010 @05:13PM (#33007856) Homepage

    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.

  • by Anonymous Coward on Friday July 23, 2010 @05:17PM (#33007898)

    I know that many will disagree with me, but about 10 years ago, when I set out to build up a large base of Linux application library code, I had to choose a language to invest in. I looked at perl, way too friggin slow, I looked at free pascal, which was really buggy at the time. I looked at some forgotten flavor of basic, which was in its infancy on Linux.

    I ended up having to choose between C or C++, if I wanted anything close to optimal performance.

    Happily, I didn't choose C++, and for the last 10 years, I have been derided by many who automatically assume that the ++ in C++ means its better. IMHO ... it doesn't mean that its better, it just means that its more bloated. A thing should be as simple as possible, not simpler. All you obfuscated C code contest fans out there, please, stay away. I prefer your "optimized" source language "tweaks" be as far away from my brain as possible, so that I don't accidentally assimilate your style via osmosis.

    Source code, isn't just instructions for the computer to follow ... it is a form of stored knowledge. As programmers, we learn and research how the computer hardware works, and we store that information, in source code form, so that other people can benefit from our knowledge. Given this fact, I felt that C was a better investment, as not only would it be useable by all the C programmers out there, it could also be easily incorporated into C++ projects. Had I chosen C++, the source code could not have been incorporated into C projects, except via binary linking.

    The process of writing and re-writing code, until you have a near optimal solution to a specific problem, regardless of the language, takes time. No amount of investing in PERL code will ever produce the near optimal results that you can obtain by investing in C code. Furthermore, once you have a near optimal solution in C, you can go balls to the wall optimal and incorporate ASM into it.

    I may get flamed for it, but I'm gonna flat out say it. C is where it's at. You can even re-use your code on an 8-bit Arduino if you want. Or burn it to an FPGA.

    Until someone comes out with a truly better solution, which C++ isn't, then I'm going to continue to invest in writing well documented, well designed, re-useable C code, as the last 40 years has yet to produce something better.

    p.s. I know there are people with managers who need report X post haste, and perl fits that bill. That's not the kind of code I'm talking about. You wanna write throw away code in response to your supervisors emotional state, then it doesn't matter what you code it in, or how well its coded. rm solves everything.

  • Re:I LOVE perl! (Score:4, Insightful)

    by Culture20 (968837) on Friday July 23, 2010 @05:20PM (#33007916)

    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.

    Unless the word is Monkey, then the plural is Monkeys.

    The nice part about the English language is that someone can speak pigeon-English and English speakers understand them very well. All those exceptions teach native-speakers to be accepting of lingual oddities. In some other languages, incorrect verb tense can make the difference between talking about "You" or "She", or incorrect tonality can make a foreigner sound like a stroke victim.

  • by Alcoholist (160427) on Friday July 23, 2010 @05:36PM (#33008114) Homepage

    As far as I'm concerned COBOL is the perfect programming language. I'm a little biased as I worked as a COBOL programmer for a time, but you have to admit the syntax is very easy to read.

    A well written COBOL program is like reading a little battle plan. It tells you, in plain English, what it intends to do and the ruthlessness of a COBOL compiler forces you to create readable, structured code.

    Every COBOL programmer knows where the period is supposed to be. C programmers still haven't figured out where the braces should be. It says a lot about a language when you have decades-long debates about punctuation in your code. It encourages a lack of programming discipline which I feel is the leading reason why software is so buggy today.

  • And video games (Score:5, Insightful)

    by Sycraft-fu (314770) on Friday July 23, 2010 @05:39PM (#33008144)

    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.

  • 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.

  • by 16K Ram Pack (690082) <tim DOT almond AT gmail DOT com> on Friday July 23, 2010 @05:54PM (#33008362) Homepage

    The "cult of classes" has really got out of hand. I spent about 4 days just looking through some C# code of a client, to try to work out exactly how it worked. No-one seemed to give a damn about making a pragmatic, easy to understand solution. Instead, it was stacks of classes inheriting from classes. In one instance, there was a "staff" class which inherited from a "person" class. But the "person" class was used in no other way than to be inherited by the staff class.

    Now, theoretically it's quite right, but it's just not pragmatic. It just adds code that makes things confusing. And things like this make maintenance of code a total bitch. I'm not against classes, but they're often overused and entirely unpragmatic.

  • "Product" (Score:3, Insightful)

    by weston (16146) <westonsd&canncentral,org> on Friday July 23, 2010 @06:10PM (#33008570) Homepage

    Oh, so he's pushing a competing product and denigrating his competition?

    "Product" is a pretty poor word choice for something that's given away in the way Go is. Pike doesn't really have much more to gain than *you* do from the adoption of Go and reduced use of C++ and Java.

    Nothing to see here, I think.

    Only if the substance of his criticism doesn't hold up. My experience suggests his objections are apt, and I might add that a casual dismissal of work by Rob Pike and Ken Thompson reflects more on you than them.

  • by bonch (38532) on Friday July 23, 2010 @06:15PM (#33008616)

    How will you fence off a satellite image?

    I know, I know, it's pointless to argue with Slashdotters who looooove Google.

  • by bonch (38532) on Friday July 23, 2010 @06:17PM (#33008640)

    Most people don't understand WiFi networking and don't realize they're broadcasting anything. I didn't say people weren't free to take pictures of your house. I'm just pointing out that you're supporting a company whose CEO said only criminals worry about privacy. If you're okay with that, then Google loves fans like you!

  • by sjames (1099) on Friday July 23, 2010 @06:31PM (#33008840) Homepage

    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.

  • by ultranova (717540) on Friday July 23, 2010 @06:37PM (#33008912)

    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.

  • Re:objective C (Score:3, Insightful)

    by BitZtream (692029) on Friday July 23, 2010 @06:38PM (#33008930)

    Objective-C has the absolute most fucking retarded 'memory management' model I have ever seen.

    Its got all the disadvantages of ref counting and non-ref counting allocation, and absolutely none of the advantages of either.

    Anyone who thinks Objective-C is simpler is sorely confused.

  • by msclrhd (1211086) on Friday July 23, 2010 @06:53PM (#33009110)

    Exactly. You don't need to use template meta-programming to get the job done for most tasks.

    Hell, just use the better C subset and the C++ library if you want to.

    There is also no need for a Singleton of a Factory that creates Factories to create objects that you pass an Observer to that calls a function to do something when a simple parametrised free-standing function will do the same job. The maintainer of the code will thank you for it (even if that maintainer is you at some point down the road).

    Think about the data and what operations you are performing on that data.

    Also, use the right languages and structures. If you have XML that you want to visualise as HTML, XSLT is designed to do that easily and reliably. If you are using JavaScript and/or python, use JSON and the native type system. Use standard library functions over hand-written ones unless you have a clear, measurable need not to.

    Work with the languages and tools you have, not against them.

  • by hendrikboom (1001110) on Friday July 23, 2010 @07:04PM (#33009228)
    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 [wikipedia.org]. 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.

  • by DerPflanz (525793) <(bart) (at) (friesoft.nl)> on Friday July 23, 2010 @07:40PM (#33009556) Homepage

    With the speed of today’s computers, though, you shouldn’t (usually) need that amount of optimization.

    And that is why we have a shitload of very crappy software nowadays. Why does a printer driver needs 110MB of hard disk space? Why does a browser (yes, that's you Firefox) need 20-30 seconds to start up? Because the developers are raised with the notion that they do not need to optimize for speed or size. I, for one, would more than welcome a generation of developers that know what they are doing and think of computer-time instead of developer-time. Especially in often-run applications. And even more especially in web-apps, which are notoriously badly designed and written.

  • by Demena (966987) on Friday July 23, 2010 @08:31PM (#33009988)
    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?
  • Umm... (Score:3, Insightful)

    by deesine (722173) on Friday July 23, 2010 @08:58PM (#33010156)

    pretty well, actually.

  • by Anonymous Coward on Saturday July 24, 2010 @01:14AM (#33011504)

    This only applies to those of limited intellect.

    This shows limited intellect: '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?'

    School teaching and industry isn't perfect, neither is any programming language, but there is an extent to which in programming one can no longer advance in a language without understanding of the underlying principles.

    Although not fully, for any scripting language there will be a vast swath of underlying operations that are based on the same system characteristics that Java and C++ express, being more of a reflection of the hardware.

    Scripting languages already have poor performance. Out of sight out of mind will only sweep it under the rug for someone to trip on later.

  • by Anonymous Coward on Saturday July 24, 2010 @02:05AM (#33011670)

    C++ Was supposed to fix the major problems with C. A few bad design decisions in the type system made that hopeless. The underlying problems with arrays remained. An attempt was made to paper that over with the "standard template library" collection classes. Collection classes were a big step forward, but they were really just papering over the moldy type system underneath, and the mold kept coming through the wallpaper. The C++ standards committee keeps adding bells and whistles to the template system, but after ten years they still don't have anything good enough to release.

    Nonsense. C++ provides excellent abstraction facilities---you're a fool if you work regularly with the low-level C constructs like arrays; unfortunately, there are a lot of fools.

    The mistake is a matter of culture: Too much emphasis has been placed on C++'s C heritage; the C fools muck everything up, and the new C++ programmers don't learn to keep out of the dirt even though C++ provides excellent boots and a well-paved sidewalk.

  • by strikethree (811449) on Saturday July 24, 2010 @03:10AM (#33011848) Journal

    "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."

    No! No no no! Stop it! It is thinking like that which has caused my dual 2.66ghz processor to provide a less responsive interface than my 7mhz Amiga provided! Really. Seriously. STOP THINKING THAT FASTER HARDWARE RELEASES YOU FROM THE RESPONSIBILITY OF WRITING EFFICIENT CODE. Really. Just stop.

    Sincerely,
    The rest of the world who actually has to use your programs

  • by Joce640k (829181) on Saturday July 24, 2010 @06:33AM (#33012456) Homepage

    C++ OTOH, has many, many, many advantages over C.

    Vou can program it like C but take advantage of a few extra things like automatic memory management (no need to use free()), better strings (no strcpy or buffer overflows), etc. C++ is every bit as good as C for this.

    But ... for larger projects C++ provides proper control of resources (objects have defined lifetimes), exception handling (which combined with stack unwinding makes writing robust code much smaller/neater/easier), much better abstraction abilities (define your interfaces then worry about the details), better namespace control, etc.

    I'm sure that as a C zealot you've argued your case against the assembly language zealots, and rightly so - there's a very good reason why people switched from assembly language to C once the C compilers reached maturity.

    Well ... this is 2010 and that exact same reason is why they later switched from C to C++.

    The reason is that C simply doesn't scale. Big projects are a LOT more work in C than in C++ (just like writing 640k programs in assembler was a lot more work than in C), and for zero gain. Learn to use your tools and the "efficiency" argument vanishes like morning mist.

Aren't you glad you're not getting all the government you pay for now?

Working...