Slashdot Mirror


Google Releases Version 1.5 of Its Go Programming Language, Finally Ditches C

An anonymous reader writes: Google has launched the sixth notable stable release of its Go programming language Go 1.5. VB reports: "This is not a major release, as denoted by the version number and the fact that the only language change is the lifting of a restriction in the map literal syntax to make them more consistent with slice literals. That said, Go 1.5 does include a significant rewrite: The compiler tool chain has been translated from C to Go. This means "the last vestiges of C code" have been finally removed from the Go code base. As for actual changes in Go 1.5, you'll want to read the full release notes. Highlights include improvements to garbage collection, the developer tools, the standard library, and new ports."

221 comments

  1. But how many women are using Go? by Anonymous Coward · · Score: 5, Funny

    The article completely omits any mention of women using the Go language. How many women are enrolled in Go classes across the US? Are there scholarships available yet so our daughters can do a doctoral thesis on Go? Google's misogyny is really shining through this time, it's pretty obvious they expect all women to become hairdressers and waitresses.

    1. Re:But how many women are using Go? by jcr · · Score: 0, Flamebait

      Looks like the SJWs are modding you down. Fuck 'em if they can't take a joke.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    2. Re:But how many women are using Go? by Pseudonym · · Score: 0

      The term "SJW" actually used to mean something before GamerGate came along.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    3. Re:But how many women are using Go? by Anonymous Coward · · Score: 1

      It means the same thing as it did before.

    4. Re:But how many women are using Go? by Anonymous Coward · · Score: 1, Insightful

      These issues are over your head, I'm afraid. The Slashdot crowd is white, male, and growing old. I only wish it weren't so embarrassingly obvious and predictable at any given moment.

    5. Re: But how many women are using Go? by Anonymous Coward · · Score: 0

      Oh no, old whites guys. The horror.

      Better ditch most of your electronic, it's a product of the patriarchy!

    6. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Just go, I beg you, go young man! Go west! A better headline: "Google Go 1.5 Gets Bootstrapped"

    7. Re:But how many women are using Go? by Anonymous Coward · · Score: 1

      As a joke, it's pretty tasteless. Especially as there was no mention of gender at all in the summary or in TFA. Why bring it up?

    8. Re:But how many women are using Go? by Anonymous Coward · · Score: 1

      > Looks like the SJWs are modding you down. Fuck 'em if they can't take a joke.

      Jokes on the poster. Its just another manifestation of the persecution complex of those who defend social injustice. You see a joke, normal people see a whinge.

    9. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      To make fun of all the articles on Slashdot that pull "gender issues" out of thin air.

    10. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      What if they were serious?

    11. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Go is a man's language. Just look at the short variable declaration:
      penis := 'D'

    12. Re:But how many women are using Go? by Anonymous Coward · · Score: 2, Insightful

      I wish you could be modded higher than +5. I see you posted as AC, because having this tied to your name would be tied to a twitter in 2018 and cost you your job in 2021, and that part makes me sad, but... such a good comment.

      Posting as AC for similar reasons.

    13. Re:But how many women are using Go? by Dog-Cow · · Score: 2

      Sexy Jewish Woman?

    14. Re:But how many women are using Go? by Pseudonym · · Score: 0, Offtopic

      No, it doesn't. It used to describe a certain kind of shallow Internet-only meme propagator. GG uses it to refer to professional cultural critics.

      FWIW, "radical feminist" used to mean something, too.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    15. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Sexy Jewish Woman?

      Yeah, mazel tov baby!

    16. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      What if my aunt had a penis? Would she be my uncle?

    17. Re:But how many women are using Go? by jcr · · Score: 3, Insightful

      Nobody's got a gun to your head to make you stick around, snowflake.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    18. Re:But how many women are using Go? by Anonymous Coward · · Score: 0, Flamebait

      Posting as AC for similar reasons.

      He was posting AC because he made a humorous though politically incorrect post. You're posting AC because you think backslapping him means you're as cool as he is. You're like the socially inept fat kid that hangs out with the class clown and is the first to laugh at his jokes. The problem is the class clown grows out of it and gets a good job, while the socially inept fat kid just eats cheetos in his parent's basement his whole life and wonders where he went wrong.

      But he does inherit their house, so there's that.

    19. Re:But how many women are using Go? by serviscope_minor · · Score: 1

      News flash: you're wrong.

      PS decidinf that there is a dichotomy between "social justice" and "idividual justice" is what's known as a "false dichotomy" and is a well known logical fallacy.

      --
      SJW n. One who posts facts.
    20. Re:But how many women are using Go? by N1AK · · Score: 0, Flamebait

      It means the same thing as it did before.

      Exactly, it's still true that if you're using it then you're a socially inadequate moron.

    21. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Well said !
      Someone should go on a march, or get a Nobel prize winner sacked, or get a Rocket Scientist to apologise for his clothing choice, or SOMETHING.

    22. Re:But how many women are using Go? by Anonymous Coward · · Score: 4, Insightful

      You say all that like it's a bad thing. Oh, sorry, I forgot. Only people who aren't white and who are less than 25 matter in the world these days.

      Helpful hint: getting older is a lot easier to deal with if you haven't spent your 20s insulting people who aren't. Because when you're not 20 something anymore, having a brain full of that kind of attitude will just make you feel even more useless than you already are right now.

    23. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      I do have to disagree with you, my friend. Social justice does exist. It's just not "justice" in the fashion that thinking people use the word. But it very much exists in the minds of those who want to take away other peoples' rights or to push their favored group ahead for no logical reason other than somebody existing.

    24. Re:But how many women are using Go? by ultranova · · Score: 1

      Looks like the SJWs are modding you down. Fuck 'em if they can't take a joke.

      Propaganda doesn't stop being propaganda just because it's dressed up as a joke. No one is under any obligation to pretend it does, either. Your very expression - the concept of "taking" a joke - implies you know full well it was meant as an attack.

      --

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

    25. Re:But how many women are using Go? by serviscope_minor · · Score: 1, Flamebait

      There is no dichotomy between "social justice" and individual justice, because "social justice" doesn't exist.

      I think I've come to the root of the problem: you're an idiot.

      http://lmgtfy.com/?q=social+ju...

      --
      SJW n. One who posts facts.
    26. Re:But how many women are using Go? by circletimessquare · · Score: 3, Insightful

      there's Feminism, the decades old effort to promote equal rights for women, which is a real and valid fight. consider the treatment of women in the Muslim world and other places like rural India. do women have a valid fight in those places against institutionalized degradation of women? they do: education denied, no right to drive a car, no right to dress as they want, etc

      that's called Feminism

      then there's "feminism", this sort of whiny inconsequential hurt feelings by navel gazing socially immature tumblr losers

      of course "feminism" is a joke. but Feminism is not

      likewise, "social justice", the hyperbolic nonsense from people who have no sense of proportionality or reason in their rants, is bullshit, but Social Justice, the decades old effort to combat systemic hatred and exclusion, is real, and valid

      don't mistake some socially retarded internet trolls and their "causes" for the actual causes they claim to stand for

      --
      intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
    27. Re:But how many women are using Go? by DNS-and-BIND · · Score: 3, Insightful

      Who said it was a joke? Gender gets brought up all the time in totally irrelevant situations, because feminists are always thinking about it 24/7 and it frames every situation they ever see. We'll be talking about debugging, or the space program, or anything really, then a social justice warrior parachutes into the conversation and derails it by spewing spittle everywhere. Always they think themselves on-topic, no matter how out-of-left-field their proposition is.

      It's not a joke, it's satire, and a damned good one at that.

      --
      Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    28. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Are you from the Bay Area, or am I over generalizing?

    29. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Having a Wikipedia entry doesn't mean something "exists".
      I can also find Wikipedia articles on Santa Claus and the Flying Spaghetti Monster.

    30. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Keep in mind, you may not be qualified to comment on what normal people see.

    31. Re:But how many women are using Go? by AmiMoJo · · Score: 2, Insightful

      It's the other way around. Anti-feminists randomly start blaming everything on feminism and SJWs in every thread. Rocket exploded on launch? It's because of pussification and millennial snowflakes being unable to handle the real world, and if only Real Men had erected the damn thing it would have entered orbit like they did in the good old days.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    32. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Who said it was a joke? Gender gets brought up all the time in totally irrelevant situations, because feminists are always thinking about it 24/7 and it frames every situation they ever see. We'll be talking about debugging, or the space program, or anything really, then a social justice warrior parachutes into the conversation and derails it by spewing spittle everywhere. Always they think themselves on-topic, no matter how out-of-left-field their proposition is.

      It's not a joke, it's satire, and a damned good one at that.

      It might have been good satire in the beginning, now a gazillion posts like this later on various geek forums, it is just a me-too cry for attention.

    33. Re:But how many women are using Go? by Anonymous Coward · · Score: 1

      The only language used by the women I talk to is Stop. :(

    34. Re:But how many women are using Go? by AmiMoJo · · Score: 1

      Problem is, people keep calling me a "social justice warrior" but I've clearly stated multiple times that I'm against discrimination... So either I'm not an SJW, or social justice isn't what you describe.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    35. Re: But how many women are using Go? by Anonymous Coward · · Score: 0

      Because gopher con wasted too much time on a code of conduct that I could not care less about.

      Great, now I'm banned from using the go nuts mailing list for not falling in line.

    36. Re:But how many women are using Go? by AmiMoJo · · Score: 1

      Instead of trying to label things in a way that is highly confusing (and impossible to distinguish when spoken), why not just make specific arguments. Not "it's whiney inconsequential hurt feelings", I mean specifics like why it's inconsequential.

      Otherwise I'm afraid you come over as just another one of those whiney people with inconsequential hurt feelings, because you are so non-specific. At least the people on tumblr identify actual issues that they care about, rather than just making general complaints about other people complaining.

      Seriously, you are so meta it's impossible to know what you really stand for. Maybe you have legitimate concerns backed by solid arguments, maybe you just don't like people criticising your way of life and choices. We can't know.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    37. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Also there's no mention of H1-B. It's another example of Dice Holdings conspiring with giant corporations to take every single available IT job and shift them to India and China.

      HAHAHAHA that's another funny joke, as good as OP's.

    38. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      I'd be more impressed if it required a semicolon as a statement terminator.

    39. Re: But how many women are using Go? by Anonymous Coward · · Score: 0, Funny

      Yes, and Donald Trump is going to change that and Make America Great Again

    40. Re:But how many women are using Go? by DNS-and-BIND · · Score: 1, Flamebait

      Uh...no. No it's not. See? It's your single-issue obsession that blinds you to what the rest of the world perceives. Everything is about your pet issue, all the time, and it's never off-topic.

      BTW the correct term is "misogynist", not anti-feminist. Anyone who disagrees with feminists is a woman-hater. All women are either feminists or masochists.

      --
      Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    41. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      What if my aunt had a penis? Would she be my uncle?

      Wow, why do you have to be such a transphobic shitlord

      Gross

    42. Re:But how many women are using Go? by praxis · · Score: 1

      The concept of Santa Claus exists. The concept of social justice exists. In fact, social justice is only a concept with no avatar.

    43. Re:But how many women are using Go? by circletimessquare · · Score: 1

      "i am a true muslim, i believe in helping my neighbor, providing for my family, and basic justice"

      "i am a true muslim, i believe in raping kafir young girls, beheading unbelievers, and reestablishing the caliphate by war"

      the world you live in is full of people who call themselves various labels with completely different meanings, some meanings even contradictory

      it is up to you to listen carefully and evaluate what they say, and figure out what they really stand for, no matter what fucking label they use. that is as good a deal as you will ever get

      the world does not come with the easy, accurate labels you want. and nobody makes the cogent arguments you want them to lead with. they all go "i am a {X}" (meaning of {X} unclear)

      people call themselves all sorts of things for completely ignorant and historically inaccurate reasons. you have to figure it out. you don't get a better deal. that's my point. do you understand?

      --
      intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
    44. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      Gender gets brought up all the time in totally irrelevant situations, because feminists are always thinking about it 24/7 and it frames every situation they ever see.

      That isn't special to feminists, and people that either lack social cues, or simply don't care, will push opinions on all sorts of topics. Slashdot has people that push pushing various political sides or anti-government spiels on topics with nothing to do with government programs, people who try to turn everything into an attack for or against religion, people playing race or racism-cards irrelevantly, etc. Heck, there is even the one guy who pushes anti-space program junk on articles that aren't even about space. On top of that, are the trolls copy-pasting these socially inept posts and using the to draw more ire, making it look like that eccentric position is now held by a larger number of people.

      At the end of the day, most people with even very strong opinions can manage to keep things relevant and/or separated, meaning you only see the people who can't, and the assholes trying to make things worse without actually caring about the particular issue.

    45. Re:But how many women are using Go? by RedK · · Score: 1

      From your description, it still means the same thing as it did before apparently. You've only further proved the point.

      "Professional Culture Critics". I'll take "Other names for Charlatans for 200$ Alec".

      --
      "Not to mention all the idiots who use words like boxen."
      Anonymous Coward on Monday August 04, @06:49PM
    46. Re:But how many women are using Go? by Pseudonym · · Score: 1

      We've already derailed the discussion of Go too much, and I'm not going to push it further by explaining how art works.

      But if it helps, consider that the word "troll" used to mean something specific, too. In the days of Usenet, trolling was considered an artform. It was the art of extracting specific responses from specific groups by the use of carefully-constructed text. The best trolls were legends. Now, it refers to brain-dead threats, defacing, disruption, and doxxing. The art of the troll is dead, thanks to psychopaths.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    47. Re:But how many women are using Go? by KGIII · · Score: 1

      I gotta be honest here and say that I agree - my perception has been that there are far more people complaining about SJWs than there are SJWs complaining about, well, anything - at least on this site. I mostly just see folks bitching about SJWs to be frank.

      --
      "So long and thanks for all the fish."
    48. Re:But how many women are using Go? by AmiMoJo · · Score: 1

      Just look at the moderation on my post. Troll and overrated. The anti-feminists are the biggest voting block on Slashdot these days, and they mod the hell out of anyone they think is an SJW. They are the problem, not the people they accuse of causing all their woes.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    49. Re:But how many women are using Go? by Anonymous Coward · · Score: 0

      So anything with a ~concept~ we must treat as real and existing?
      I don't think that's what you want

    50. Re: But how many women are using Go? by Anonymous Coward · · Score: 0

      just move to arabia, communist. get a circumcision.

    51. Re: But how many women are using Go? by Anonymous Coward · · Score: 0

      and we are going to help him in the effort. he is one of the best things happened to america since george was bought by the wahabists.

    52. Re: But how many women are using Go? by Anonymous Coward · · Score: 0

      all non communists are fascists. comprendre, comrade ?

  2. Oh no.... by Anonymous Coward · · Score: 5, Insightful

    Google is ditching C! Oh my ... Wait.. what... you mean, "ditching C in their Go language platform". Uh... well.. duh, who actually would think they'd use C in their own new shiny language toolchain, that's like anti-advterisement.

    Oversensational header, disappointing....

    1. Re:Oh no.... by Z00L00K · · Score: 5, Interesting

      I agree that it's more like a balloon popping news than revolutionary news. And in any case - there's still C and assembly somewhere.

      When I look at the code examples my opinion is that it reminds me of a mix of C/C++ and Pascal. Not necessarily bad, just an observation.

      What I think lacks when it comes to the Go compiler are the number of platforms supported, some are missing, like ARM and MIPS. Hopefully that will come as well.

      How about translation tools - something that can convert Java to Go?

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    2. Re:Oh no.... by Anonymous Coward · · Score: 2, Informative

      Yes, the headline is a bit oddly phrased.

      Getting to the self-hosting stage is a major milestone in any programming language.
      Before that it is just a novelty or support language.

      "With version 1.5, the Go toolchain is now self-hosting!" would have been a more descriptive and less flamebaity headline.

    3. Re:Oh no.... by brantondaveperson · · Score: 1

      We build go code for ARM, so it can't be that missing. Don't know about MIPS though.

    4. Re:Oh no.... by tepples · · Score: 2

      Uh... well.. duh, who actually would think they'd use C in their own new shiny language toolchain

      The reference implementation of Python, a different language that's been around as long as Linux, is still written in C. So go figure.

    5. Re:Oh no.... by Desler · · Score: 1

      Which isn't really the same thing. You're conflating compilers and interpreters as if they were the same thing.

    6. Re:Oh no.... by HiThere · · Score: 1

      IIRC there is a Python compiler, it's just that it compiles to "p-code" (i.e., code for the Python virtual machine).

      OTOH, lots of Python has both a Python reference implementation, and a C version that's used to speed up execution.

      Your basic point is still correct, that Python is not really optimized for speed, except in places. The design is intended to be "fast enough". (Whether it is or not depends on what you're doing. The libraries tend to be optimized for speed.) S.a. Pypy.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
  3. Sucks they're dividing efforts between Dart & by Anonymous Coward · · Score: 0

    Dart is an awesome language, and we have nearly a million lines of it running both client-side web and server-side. It is a spectacular language. Go is probably better on the server side, but you can't ignore the web. Imagine how much nicer Dart could be if they weren't distracted by Go.

  4. Re:Sucks they're dividing efforts between Dart &am by Lisias · · Score: 1

    One size doesn't fits all. I'm happy they didn't ditched any of them.

    --
    Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
  5. They aren't "dividing" anything by melted · · Score: 1

    Dart and Go are being developed by two completely separate groups of people, and they've been all along.

    1. Re:They aren't "dividing" anything by DrXym · · Score: 2

      And this is why Google sometimes ends up confusing everybody by splitting their support down the middle. Look at Android and ChromeOS as another example of two projects that should be one and the same.

  6. Can Go still not load shared libraries? by Anonymous Coward · · Score: 0

    Go is a somewhat interesting language but from the beginning it hasn't supported basic stuff like shared libraries and a FFI. The executables were still all static the last time I checked (admittedly probably years ago).

    1. Re:Can Go still not load shared libraries? by brantondaveperson · · Score: 1

      Shared libraries are more trouble than they're worth. Having a go compiled executable be entirely standalone (OS calls notwithstanding, I suppose) is an advantage in my opinion.

    2. Re:Can Go still not load shared libraries? by KiloByte · · Score: 5, Insightful

      Static linking might be semi-adequate for stuff that you compile at home, but for any code that's distributed using static is a sabotage. For example, when there's a bug (security or not) in a library, you can't avoid recompiling the world. That's why distributions go for 100% dynamic linking, and why they dislike current Go.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    3. Re:Can Go still not load shared libraries? by Anonymous Coward · · Score: 0

      Can't DLLs be non-shared?
      I use DLLs all the time in my coding, and very few are system resources. It just allows a nice encapsulation, and, as you mentioned, the ability to (carefully) patch small changes.

      Live patches are often very dangerous. You need to be careful the VTables are consistent.

    4. Re:Can Go still not load shared libraries? by Ian+Lance+Taylor · · Score: 5, Informative

      The Go 1.5 release includes preliminary support for shared libraries. You can now build your Go programs to use shared libraries, on x86_64 GNU/Linux. You can also build shared libraries that can be linked into a C/C++ program, on several platforms.

      Go has had an FFI for calling into C from the beginning: https://golang.org/cmd/cgo .

    5. Re: Can Go still not load shared libraries? by Anonymous Coward · · Score: 0

      Being able to compile windows, Mac, Linux, android, and now iOS binaries from any of my machines and have them run with the end users not needing libraries and interpreters setup is fine by me.

    6. Re:Can Go still not load shared libraries? by blivit42 · · Score: 2

      Static linking might be semi-adequate for stuff that you compile at home, but for any code that's distributed using static is a sabotage.

      I think you've got that backwards. Dynamic linking is fine for stuff you compile at home, but for any code that's distributed, using dynamic linking will often cause your binary to *just not work* on another system.

      Missing a shared library? Which package does it come in? Oh crap, that package requires dependencies I don't have, or are the wrong version, etc.. Or you have the shared library, but it is a different version, and the size of a structure or something changed, or a variable doesn't exist anymore, and your binary crashes, won't run with it, or produces corrupt output. Or you go through all of your dependency Hell and update all the libraries you need to install the package with the missing shared library, only to find that the libraries you updated caused other programs to break for similar reasons to why yours wasn't working with your current library version. Newer versions of libraries do not always maintain binary compatibility with older versions.

      Some programs should just be statically linked, so that they will always work on any version of any distribution. Otherwise, there may be no avoiding a recompile and its associated dependency Hell. Static linking is a compatibility God-send.

    7. Re:Can Go still not load shared libraries? by Zan+Lynx · · Score: 1

      Go executables are static by design. It is pretty great to be able to copy it into place and it just works. Add a couple other build options to remove the ability to bind to external C code and include a Go DNS resolver, and the binary can be put into a completely empty container. Now that's great. It's the difference between 8 MB and 300 MB containers.

      The arguments about fixing bugs in shared libraries do apply, but that's a problem with containers too, so you need a policy for rebuilding containers with bugs as well as Go binaries with bugs.

  7. And 400 Linus Clones Cried Aloud by Anonymous Coward · · Score: 0

    But C? Who da ELL uses that anymore? C++!! Notice the PLUS PLUS? That's double plus good!! Google wants the world to drink its coke. That is all. Men won't care about GO-ogle. Women? Numbers too small and, yes, Helen Reddy, very easy to ignore.

    1. Re:And 400 Linus Clones Cried Aloud by Anonymous Coward · · Score: 5, Informative

      Someone isn't an embedded systems programmer. Many many embedded systems use C because its fast, flexible and flipping works.

    2. Re:And 400 Linus Clones Cried Aloud by kthreadd · · Score: 1

      But C? Who da ELL uses that anymore? C++!! Notice the PLUS PLUS? That's double plus good!! Google wants the world to drink its coke. That is all. Men won't care about GO-ogle. Women? Numbers too small and, yes, Helen Reddy, very easy to ignore.

      The GNOME desktop environment is too a large extent written in C, and so are many applications that target the GNOME environment.

    3. Re:And 400 Linus Clones Cried Aloud by Anonymous Coward · · Score: 0

      > The GNOME desktop environment is to a large extent written in C

      That's one of the reasons KDE is better. (wait a sec, let me zip my flameproof vest...)

    4. Re:And 400 Linus Clones Cried Aloud by adhdengineer · · Score: 0

      no. they use C because there isnt a c++ compiler for the platform.

    5. Re:And 400 Linus Clones Cried Aloud by Megane · · Score: 2

      As an actual embedded systems programmer, I can tell you that most of them use C because they can't grok (or even actively hate) C++. Sure, you don't want to go nuts with dynamic allocation (a bad thing in the small-system embedded systems world), but a subset of C++ * can be quite effecitvely used for embedded systems programming. Just limiting yourself to C99+classes+virtual method functions and static/auto scope objects can really improve the quality of your code over C.

      * Yes, EC++ as a specific C++ dialect may be defunct, but IMHO it was created more for the benefit of compiler vendors who were having trouble getting templates and exceptions working properly back in 2002 or so.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  8. Re:Sucks they're dividing efforts between Dart &am by Z00L00K · · Score: 1

    To me Dart is "Dual Asynchronous Receiver/Transmitter", like the Z-80 DART.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  9. Jobs for all the H1-B visa workers! by Anonymous Coward · · Score: 0

    Damn shame there aren't any talented American Go devs.

  10. And yet by Anonymous Coward · · Score: 0

    Google still sucks as a company. Mind-boggling.

  11. DAMMIT JIM by Anonymous Coward · · Score: 0

    Google should just try to brew beer instead of trying to write programming code.

    H haa

  12. Re:Sucks they're dividing efforts between Dart &am by Anonymous Coward · · Score: 0

    Or, if you try to search for Dart on Google, it's Dallas Area Rapid Transit. It's better now, but when I first started using Dart three years ago, the first page of results was always for the Dallas mass transit.

  13. Finally! by thegarbz · · Score: 4, Interesting

    It's about time. Wait ... is it? What was so bad about C? Was there an active campaign to eliminate it? Were they behind on some schedule or hanging out against the wider desire to ditch C?

    Why are we finally ditching something that worked?

    1. Re:Finally! by Anonymous Coward · · Score: 0

      C & Bash is all everyone should ever need. It's how God intended. Go, Perl, Python, C++, Java, etc., there's no need for them.

    2. Re:Finally! by bug1 · · Score: 1

      Hang on a second... BASH ?

      You mean posixly correct shell surely !

    3. Re:Finally! by complete+loony · · Score: 5, Interesting

      Builds in Go 1.5 will be slower by a factor of about two. The automatic translation of the compiler and linker from C to Go resulted in unidiomatic Go code that performs poorly compared to well-written Go. Analysis tools and refactoring helped to improve the code, but much remains to be done. Further profiling and optimization will continue in Go 1.6 and future releases. For more details, see these slides and associated video.

      And replacing it with something slower.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    4. Re:Finally! by Anonymous Coward · · Score: 5, Interesting

      They removed C code from the runtime so they had one language to reason about in the garbage collector. It makes updating the pointers on the stack easier among other things: Go 1.5 includes a new moving mostly concurrent garbage collection that wouldn't have been practical with random runtime c code on the call stack. It also makes it easier to contribute to the project (less languages involved), and removed the need for maintaining their modified C compiler that worked with their ABI and stack management.

      So no, none of the reasons they removed C were because C is bad (Though they would also claim it has its issues). It mainly was problematic to have a second and non memory safe language involved in the runtime. The reasons for removing it from the compiler are less clear cut, but some of the same reasons apply.

    5. Re:Finally! by Anonymous Coward · · Score: 0

      C is not good. Every week I stumble upon bugs because of improper memory handling by C programmers. 43 years of C should have thought us how to use C, but the opposite has been shown. C is too difficult for most people to get fully right and even experts do make mistakes with C. Even the very highly skilled OpenBSD developers that peer-review each others code make occasionally bugs because of how C is designed.

      Yes, there are some really skilled programmers able to create good stuff with C, but they are in far minority.

      I fully understand their desire to drop out C. When they drop out C, they do not have to think about the special class of bugs that comes with C, but they can focus on algorithmic bugs. What is more frustrating than bugs in a compiler? By using C, they surely would have a higher number of bugs in the compiler.

      I am not saying C should be thrown out everywhere, but there where it is possible, it should be eliminated. Aren't we tired already of non-algorithmic bugs?

    6. Re:Finally! by Tough+Love · · Score: 1, Interesting

      Compared to C++, C is a clumsy anachronism. Speaking as a C expert and someone who still writes a lot of it. C is bad news for maintainability and abstraction. Those who insist on denying that end up with sprawling haphazard embarrassments like GTK and Enlightenment.

      In any case, the limitations of C are not the issue. The issue is, if a systems language is inappropriate for implementing a compiler for itself, then does it deserve to be taken seriously? It is a matter of proving the worth, power and efficiency of the language. Another advantage for implementing a compiler in its own language is the simple but powerful regression test: can the compiler compile itself so that the result can also compile itself?

      As far as C compiling itself goes, GCC won't be doing that any more, it is moving to C++.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    7. Re:Finally! by Tough+Love · · Score: 1

      No, BASH. If you're going to go ugly, go all the way.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    8. Re:Finally! by Anonymous Coward · · Score: 0

      Seeing that you mention GTK as a sign of why C is bad, I just have to remind you that the QT people think C++ is so bad that they had to invent their own pre-processor.

    9. Re:Finally! by Dog-Cow · · Score: 2

      I am no fan of C++, but to be fair, the language has a changed tremendously in the years since Trolltech first wrote their own preprocessor. Does it persist out of necessity or inertia?

    10. Re:Finally! by Anonymous Coward · · Score: 0

      great, another mini language that makes no sense for a company to invest in.
      "Quick - we need 20 go developers!" What, there aren't that many? Shoot....
      Whats the unique selling proposition for a company to take this on?
      C/C++ high speed/low latency, with a good memory allocator, you knock java and go out of the water.
      Java - good as it helps the lower 50% of development talent (and remember you have them too!) be productive, plus massive library suites
      There are pages of little bespoke languages, whats the reason to un-ignore this one?

    11. Re:Finally! by Anonymous Coward · · Score: 1

      And PHP. You need PHP, too.

      C, Bash, and PHP.

    12. Re:Finally! by serviscope_minor · · Score: 2, Insightful

      Necessity.

      There's nothing out there with the same combiation of performance and expressive power. nd frankly for modern C++14 code, it feels like writing in scripting laguages half the time except that it goes FAST.

      --
      SJW n. One who posts facts.
    13. Re:Finally! by squizzar · · Score: 1

      C compilers are more complex than higher-level language compilers? Ok buddy...

    14. Re:Finally! by jcr · · Score: 0

      What was so bad about C?

      The biggest problem with C is that it doesn't have strings or arrays. C has pointers, which appear to the naive programmer to be an adequate substitute for arrays, because C's syntax can make pointers appear to be arrays. The upshot of this has been decades of memory-corrupting errors, resulting in crashes, security breaches, etc, etc.

      Even in expert hands, C code is fragile. In the future, it will be taught as an historical example of slipshod, primitive language and compiler design.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    15. Re:Finally! by jcr · · Score: 2, Interesting

      Compared to C++, C is a clumsy anachronism. ...and C++ is an appallingly bad attempt to remedy some of C's problems by layering on needless complexity.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    16. Re:Finally! by jcr · · Score: 2

      I would say that it persists primarily because of all the C++ coders who are so proud of their knowledge of C++'s idiotic idiosyncrasies.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    17. Re:Finally! by Anonymous Coward · · Score: 0

      C compilers are more complex than higher-level language compilers? Ok buddy...

      You completely misunderstood me.
      C compilators are comperable simple, thus requiring more of human, often more than what human can handle.
      Higher languages have more complex compilators, requiring less from the human.

      In a complex compilator for a higher language, you do not want parts of it written in a low language as C if it is avoidable. A programming error in a compilator affects really many comparing to a programming error in an end application. Sometimes it is difficult to know if the error is in own code or in the compilator.

      I am sure they can speed up the development a lot by dropping C. They get to actually work on the algorithms and not fixing memory leaks, buffer overflows etc. And this is in the language they are actually most expert in.

    18. Re:Finally! by Anonymous Coward · · Score: 0

      Marketing-wise, bootstrapping the language provides some PR leverage.

      If they kept C code, people could argue that C is somehow better than Go because Go is based on C.

      By replacing any C code with Go code, Google's PR machine starts to claim that Go is so much better than C to the point that it even replaces it anywhere.

      There are also some minor advantages in removing any dependency on foreign languages, such as simplifying its maintenance.

    19. Re: Finally! by Anonymous Coward · · Score: 0

      You can build dynamic websites with C. You don't need PHP. JavaScript on the other hand is something that's very tricky to do without.

    20. Re: Finally! by Anonymous Coward · · Score: 0

      C++ sucked a bit when Qt devs wrote the preprocessor. If they started from scratch with C++14 they would have taken a different approach.

    21. Re: Finally! by Anonymous Coward · · Score: 0

      Seriously, stop signing all your posts with your username. The username field handles that just fine.

    22. Re:Finally! by DrXym · · Score: 1
      C and C++ barely lift a finger to help with memory safety, concurrency and a whole bunch of other problems that continuously catch developers out. Thus far they've survived because higher level languages (that solve these issues) tend to impact on performance.

      Now we're seeing the likes of Swift, Rust, Go which allow developers to enjoy the speed of C/C++ but without as many pitfalls. They also tend to be more terse languages, produce more meaningful error messages and compilation is faster. These things should (theoretically) mean better quality code and faster development turnaround. Of the three I think Rust looks the most promising system language although Swift is obviously going dominate in Apple development.

    23. Re:Finally! by TeknoHog · · Score: 2

      The biggest problem with C is that it doesn't have strings or arrays.

      ...

      In the future, it will be taught as an historical example of slipshod, primitive language and compiler design.

      Agreed, but I'd also argue that C was pretty nice for its time, as a kind of portable assembler. To me, C is a model of a simple CPU/computer, and it's no longer a good fit for our modern multi-CPU machines, with vector types and everything.

      With higher level languages, it's easy to deal with vector and matrix types, where components are assumed independent of each other for automatic parallelization. This is how the scientific computing community managed parallel computing way before the "multicore" craze, by using suitable languages such as Fortran. Plain C wouldn't work due to being too low-level.

      Of course, parallel programming in general is harder than simple vector math, but there's a more general lesson about language design: don't assume too much about the underlying hardware. If your language is based on today's hardware, chances are it won't be a good fit for future machines.

      --
      Escher was the first MC and Giger invented the HR department.
    24. Re: Finally! by Anonymous Coward · · Score: 0

      Lock-in. MS does the same with their myriad of programming languages.

    25. Re:Finally! by Anonymous Coward · · Score: 5, Insightful

      Yeah, you try using a garbage-collected language in large embedded systems with real-time requirements. The unpredictable nature of the garbage collector really screws around with you. People have been claiming to have deterministic garbage collectors forever too, but usually their overhead makes them not worthwhile, too.

      C++ is (well, can be) maintainable and quite appropriate for real-time use as long as you use an appropriate subset (exceptions are usually a no-no, for instance), and you get some higher-level abstractions that are very, very useful and that generally compile to fast, efficient machine code.

    26. Re:Finally! by Anonymous Coward · · Score: 1

      If you really think so, then your understanding of C++ is insufficient. Try reading "Effective C++" or "Modern Effective C++" sometime.

      Either C++ isn't as complex as you think it is, or you haven't run into instances where the complexity that you call "needless" is actually useful and necessary.

    27. Re:Finally! by Anonymous Coward · · Score: 0

      Try C++14 sometime, with built-in threads and locking, and with shared_ptr.

    28. Re:Finally! by Anonymous Coward · · Score: 0

      Compared to C++, C is a clumsy anachronism. Speaking as a C expert and someone who still writes a lot of it. C is bad news for maintainability and abstraction. Those who insist on denying that end up with sprawling haphazard embarrassments like GTK and Enlightenment.

      The Linux kernel is also written in C. What are your opinions on it?

    29. Re:Finally! by jbssm · · Score: 1

      Same reason we ditched Assembler somewhere in the past. Languages need to evolve, we can't be stuck with C and it's design limitations forever. C served us well, just like Assembly had done, but as compilers evolve we can proceed to higher level languages paying a very little penalty in execution time and in control.

    30. Re:Finally! by thegarbz · · Score: 1

      My question wasn't generic, it was rather specific. Go was written in C. What was the big drive and from the sound of the headline an urgent and repeatedly delayed push to write it in something else that warrants the use of the word "Finally".

    31. Re:Finally! by thegarbz · · Score: 1

      And yet it worked, so what was the driver to port away from C in this specific case?

      Being primitive is not a reason to abandon something if primitive did the job.

    32. Re:Finally! by AmiMoJo · · Score: 1, Informative

      Compiling itself is a major milestone for many languages. C itself passed that point fairly early on, going from being written in BCPL to pure C, at which point a lot of other code started being translated too. It's a good demonstration of the language, as much as anything.

      As for C vs. C++, I think you have it backwards. C is an excellent system programming language and nothing else has managed to supersede it. All major operating systems are written in C, including Linux, the BSD/MacOS kernel and the Windows kernel.

      C++ is a terrible language for most purposes. No good for system programming, and not great for application development. Later languages vastly improve upon it.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    33. Re:Finally! by DarkOx · · Score: 5, Insightful

      I agree the issue here isn't ditching C so much as having a self hosting language. Self hosting has all sorts of advantage the ones you point out are the biggest.

      With a youthful language often new features and revision appear in the reference compiler first. If designing something like a new syntax or language construct a good hit you are doing something right is when its strait forward to express within the existing language. When it comes time to implement and you are working in the native language if you find you can't express the new construct easily it might mean the relationships and orthogonality are not as clean as you think.

      I disagree that is bad new for maintainability and abstraction. There are plenty of very large very old C projects that are perfectly maintainable. Its a question of discipline mostly and selecting right abstractions. GTK is a mess because its an objected oriented library written in a procedural language. OO isn't the only possible design choice even though that is all many people are taught today. Had a procedural abstraction been chosen I am sure it would be fine.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    34. Re:Finally! by squiggleslash · · Score: 2

      They're not ditching C. The headline was intended to mean "Google releases Version 1.5 of its Go Programming Language which finally ditches C" (itself poor wording, but at least accurate and non-misleading) but for some reason a comma, implying Google was the entity ditching C, was substituted in place of the "which". If the submitter was short of characters for the headline, ditching "Google" and using the phrase "self hosting" somewhere would have been less clumsy and harder to mess up.

      Go being self hosted is a good thing, as it implies maturity and makes it less dependent upon existing infrastructure.

      C is... problematic and there are good reasons to steer clear of it when it's unnecessary to use it. String handling, for example, is abysmal in C and one of the largest causes of bugs. As a result a sizable proportion of the development community does try to get away from C when it can find an opportunity to. But that has nothing to do with the article at hand.

      --
      You are not alone. This is not normal. None of this is normal.
    35. Re:Finally! by bgarcia · · Score: 1

      Because a compiler proves that it's not a toy by being self-hosting.

      I'll bet that somebody will look to improve the performance in subsequent iterations. This is just the first revision, and it sounds like they did a direct translation from C to make sure that it would behave exactly the same.

      --
      I'm a leaf on the wind. Watch how I soar.
    36. Re:Finally! by gbjbaanb · · Score: 1

      The biggest problem with C is that it mirrors how computers work.

      You can complain that it doesn't do things the nice and easy way you'd want, but unfortunately the computer you're using doesn't do it that way either. Now you can wrap those constructs with something easier to use, but you've just added a layer of complexity over the top. Insist on more easy-to-use-features (eg garbage collection) and you end up with something really slow and cumbersome for a computer to process.

      Fortunately we have computers that have incredible amounts of CPU and memory so we don't notice so much (well, until they pause momentarily due to GC collecting) unless you're running am environment where performance matters such as a busy server or an underpowered phone.

      That's the trouble with working with things, you have to adapt yourself to the problem domain. C programmers can write very good programs, the ones who know how to write correct C programs think about what they're doing first, modularise it, decide on the interface points between modules and then start writing code. For an example, the Linux kernel (and a lot of the userland) is written in C and yet it happily churns away without crashing, leaking or all the other aspects of bad programming you complain of.

      Now I've seen C# code crash regularly, and leak memory (in a system that apparently cannot leak memory) and have security bugs.

      So the problem is in the workman, not in the tools.

    37. Re:Finally! by Anonymous Coward · · Score: 0

      Because teenagers tend to crash tractor-trilers a lot, means that we should ban tractor-trailers.

      The arguments against C and C++ pretty much always hinge on "Some people can write bad code in C."

      Well...DUUU-UUU-UUUHHH!

      C and C++ are system-level languages. They are grown-up, complex, powerful and dangerous as hell.

      Only fairly experienced systems-type programmers should be working in C and C++.

      That's one reason that C++ programmers (good ones, anyway) tend to make a fairly good wage.

      There's a number of jobs in software that can only be done by a system-level language. For those, we use C/C++.

      In any case C++ 14+ is rapidly becoming a much safer language. Bad programmers can play in a fairly safe sandbox these days.

      Source: I run a C++ shop, and am constantly seeing disasters caused by bad C++ programmers, and super-WIN from good ones.

    38. Re:Finally! by serviscope_minor · · Score: 5, Insightful

      All major operating systems are written in C, including Linux, the BSD/MacOS kernel and the Windows kernel.

      And the common thing about those is all of them are OLD. Sure there are new parts, but they were all started a very, very long time ago when C did have major advantages over C++ (no standard C++, slower code, buggy compilers significantly lagging the standard when it finally arrived). Of course in the mean time, there have been 3 major language versions (98, 11, 4), one minor one (03), and a bunch of TS (<3 concepts! finally!), not to mention truly vast improvements in compiler performance, and the final arrival of two production quality open source compilers which are generally in advance of the standards, not behind.

      Back in '94 when they tried compiling Linux in C++ and it went slower, well, then C had advantages over C++. That was over two decades ago. The world has moved on since then.

      As we've seen with GCC who have been undergoing a heroic effort, it's a lot of work to move an old project from C to C++, and you have to have the devs on board (given Linus's major blind spots he'll never do that for Linux). There's also very little advantage initially because most of the code is idiomatic C, and getting good paramaterised containers, type safety, leak safety etc etc is a lot of very slow work. It's not merely enough to switch your compiler, to get the full advantages you more or less have to rewrite the entire project from the inside out.

      And as for OSX, well, parts of the kernel are written in C++, and in fact the device driver layer supports it. It's a subset, which doesn't allow any of the bits requiring significant support from the runtime (exceptions, RTTI/multiple inheritance) and bizarrely, templates which are basically invisible at that level.

      C++ is a terrible language for most purposes. No good for system programming, and not great for application development. Later languages vastly improve upon it.

      Many of the big "applications" on my machine that I regularly use are written in C++. There's firefox, Eagle CAD, Libreoffice, IAR embedded workbench, inkscape, okular not to mention GCC 5. Oh and the JVM of course. And unity (the game engine) is itself written in C++ even if most of the game code is C#. Oh and llvm. I almost forgot about that!

      In the case of Firefox, C++ is apparently so far superior to everything else that the only way to move off C++ was to develop a completely new language, because nothing out there was worth moving to.

      Fortunately, Rust is written by people who seem to know, understand and like C++, which means it has a much greater chance of actually being better, unlike all the supposed C++ replacements which are mostly much worse except for some small domain.

      No good for system programming

      It's excellent for systems programming. It's better than C in pretty much every single regard[*].

      Later languages vastly improve upon it.

      Such as? One of the nice things about watching a talk by Stroustrup is he has a bunch of pretty pictures about where C++ is used. C++ is on mars. And there's a reason you haven't heard about the Emma Maersk drifting around unpowered in the Pacific ocean (the ECU for the Flex96-C engine is written in C++). And there's also a reason you're almost certainly reading this post in a browser written in C++.

      And not one of those other vastly improved languages.

      So finally a challenge for you and everyone who modded you as insightful:

      I like C++, but I could bend your ears for days about what's wrong with it, and why it's a pain in the ass in a variety if interesting and distressingly subtle ways. If there are vastly superior languages out there for what I do, then let me know, because I'd love to use them.

      [*] The only regard in which it's not is that a few obscure platforms don't have a C++ compiler.

      --
      SJW n. One who posts facts.
    39. Re:Finally! by The+Evil+Atheist · · Score: 1

      Name 5 complexities which are needless.

      --
      Those who do not learn from commit history are doomed to regress it.
    40. Re:Finally! by Anonymous Coward · · Score: 1

      Congratulations, you are literally (as in the real meaning of literally) the first person I've ever seen use the word "compilator" for "compiler", which is impressive since the post you responded to used "compiler" which means you had to make the conscious effort to insist that they were wrong. My spell check doesn't even recognize compilator as a real word. I understand, English isn't your first language, but really, the post you replied to had the right word, and you chose to replace it.

      And at any rate, remember, especially in the area of the run time environment, it can be advantageous to use a faster language programmed correctly but taking more development time over a safer language allowing faster development simply in the grounds as to think how much extra electricity will be used by all those instances running using more power than is necessary. I've always thought how much coal is burned that doesn't need to be, simply because the web likes to use inefficient languages. Probably impossible to quantify, but I bet it's a lot.

    41. Re:Finally! by Anonymous Coward · · Score: 0

      erm.....doesn't have arrays? I guess by your definition of array it doesn't. But by the standard definition of array where it's items stored sequentially in memory, then yes, it does.

      Seriously, I don't know what you're smoking, but share?

      And C code is still with us for a very good reason. It's near perfection as a language. It's almost impossible to improve on. It gives you power and flexibility when you need it with a simple and easy to learn syntax, which does mean in the hands of the incompetent, they will hang themselves, but since it also provides a clean simple syntax that when used correctly is easy to understand. But yes, the power and flexibility does allow for people to do bad things, but when you need to do them, it's life blood. One of my favorites is, start playing around with casting values and using variables of non-integer type in java. Bit banging is another one. These things are trivial in C, go into the "safe" languages and they're so frustratingly finicky you want to throw your computer through a window.

      Yes, I will agree, C in the hands of the incompetent is bad, and I will also agree that probably about 90% of developers are incompetent. But just because an idiot misuses something doesn't mean that thing is bad. It means the idiot shouldn't be using it. And in the world of software, I tend to say that if a developer can't wield C, they probably shouldn't be developers in the first place. I always remember the crack web devs that were brought in to develop an online application and it was so secure because it was done with safe languages and frameworks like ruby on rails, that there was no way it was going to be hacked. Until the "developers" didn't realize they had to change default passwords. That came in to a problem because they were also taking care of hosting it.

    42. Re:Finally! by Anonymous Coward · · Score: 0

      HFT platforms have been written in Java with no issues at all (refer to LMAX Disruptor and Netty). The systems are so memory frugal (using zero copy techniques and object recycling) that they can actually schedule the GC for down time.

    43. Re:Finally! by Anonymous Coward · · Score: 0

      http://yosefk.com/c++fqa/
      http://yosefk.com/c++fqa/defective.html

    44. Re:Finally! by Greyfox · · Score: 1
      A lot of those complexities are there to enforce type safety. So I can, for example, use boost's type-safe signal/slot library and catch a lot of errors at compile time that would have resulted in run-time exceptions in other languages. Having had to maintain several java programs that used reflection (Apparently because the designer had read about it in his "Java for Dummies" book and thought it was cool,) I have to say I appreciate catching errors at compile time. Or in unit testing.

      C++ in the early days did suck. Look at a last-generation library like gdal -- you never know who owns any particular piece of data, and you'll constantly find yourself in situations you need that piece of data outside the only place you can actually enforce its destruction when it's no longer needed. You rarely run into those problems in current-generation libraries like boost. Once we started to figure out how to use it, the language got a whole lot better. Most developers don't need to delve into esoteric metaprogramming techniques to be able to use the language effectively.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    45. Re:Finally! by DuckDodgers · · Score: 1

      Go as a C++ replacement should be fine unless you need manual memory management. D as a C++ replacement should be awesome - D has garbage collection by default but manual memory management as optional. I'm surprised the Mozilla team didn't go with D. I don't have anything against Rust, mind. It just seems to me that in general terms D already provided almost everything the Rust designers had in mind.

      C++ drawbacks:
      1. The language has a long history, which by its nature means there is tons of older C++ code around. So while you can write a new program with a small, safe, consistent set of the language features, you will often find yourself reading and calling older code that deals with corner cases and language features you don't understand. (I mean "you" in the general sense, for all I know serviscope_minor knows every revision of the C++ standard backwards, forwards, sideways, and inside out and all of the compiler quirks and corner cases dating back to Stroustrap's first release.) Go, Rust, and D adoption is hindered by the fact that there isn't half a billion or more lines of code in their respective languages in use around the world, but for all three of those languages you won't get bitten by misunderstanding older versions of the code or compiler quirks. They were designed with the benefit of hindsight using C++ as a starting point.
      2. C++ has a preprocessor and header files. In the time it takes to compile a three million line C++ program, you can compile a three million line Go or D program and build a two car garage. I think Rust is in the middle, but closer to Go and D for compiler times on large projects than to C++. The C++ preprocessor and header files are fundamental to the language, you can't get rid of them without breaking most older C++ projects. This is a headache that will never go away. This slow compile time is the fundamental reason most websites are not written in C++ despite the fact that C++ demolishes competitors for performance. I expect to see more websites written in Go, D, and Rust as time goes on because they're getting close to C++ for raw performance but the edit-compile-run-test loop time for any website much bigger than "Hello World" is much closer to that of PHP than that of C++.

    46. Re:Finally! by Anonymous Coward · · Score: 0

      Yep. Call out a language on one of its major and proven flaws, and the response is "you just don't understand it."

      C++ is the product of a troubled mind. And arguing with any C++ proponent is like arguing with my wife. "you just don't understand. You just don't get it." Yes I do get it. You invented a 90000000000000000000 headed monster just to have some decent memory management. And if it's "metaprogramming" you want, Common Lisp already kicked your ass up one side of the street and down the other. CL stood on your chest and pissed into your busted open skull. But, I guess you just aren't smart enough to understand Common Lisp. Because if you were, you never would have invented C++.

    47. Re:Finally! by Yunzil · · Score: 1

      C++ is a terrible language for most purposes. No good for system programming, and not great for application development.

      Well, that's one person's opinion. I mean, it's completely wrong, but it's an opinion.

    48. Re:Finally! by adhdengineer · · Score: 1

      i dont need build in threads. threads are easy. really easy. so is thread locking when you use RAII to do it. I like shared_ptr tho.

    49. Re:Finally! by deviated_prevert · · Score: 1

      can the compiler compile itself so that the result can also compile itself?

      As far as C compiling itself goes, GCC won't be doing that any more, it is moving to C++.

      Just maybe someone will create a tool chain in Go that will create spontaneous executable code from code and the Go compiler will successfully do what Bill Gates and Microsoft tried to do with Windows, that is inject itself into every single computing device on the planet. Who knows? maybe in a few years all one will have to do is put any device on the net and it will instantly have a little baby Google interfaces created and injected into it to make it work. This would could scare the heck out of all the tin foil hat crowd here that dissis google all the time.. Perhaps Google Go in the future can create instant custom coded interfaces that will completely eliminate the need for things like the Windows operating system. All you do is put your device on the net and call for a set of functions to be added to it and you can tailor make the programs and how they work in seconds all by yourself.

      HMM self creating code interfaces, on the net and available to be custom added to any device you so choose instead of having the manufacturers and software house dictate how the devices work, just let the consumers create their own. Interesting concept N'est Pas? Thank heavens Google is not an evil company that is hell bent on taking over the world the way Microsoft was!

      --
      This message was not sent from an iPhone because Peter Sellers really was a deviated prevert without a dime for the call
    50. Re:Finally! by serviscope_minor · · Score: 1

      Go as a C++ replacement should be fine unless you need manual memory management.

      No, not really. Go as a C++ replacement for writing server side RESTish sort of code would be fine. As a general C++ replacement not so much.

      Go has much weaker abstraction mechanims, so you can't build your own datastructures that work like the builtin ones. Unless your problem happens to map well on to slices and maps, it's just not very good. I'm currently writing quite a bit of computer vision code in C++ (and the operator overloading maths vector and matrix libraries work very well), and some embedded code where my small template fixed point library also works very well.

      As for D, well, the fact that the language is a bit changable doesn't help. I kind of like not rewriting stuff regularly. It does look like a nice language and there are many things which are much more awesome than C++.

      To me the type system is less well thought out, however, and also C++ has some truly marvellous extensions like OpenMP which make multi-threading the type of code I write a complete breeze.

      Though rust has some wonderful things like memory and thread safety via the type system.

      The language has a long history, which by its nature means there is tons of older C++ code around. So while you can write a new program with a small, safe, consistent set of the language features, you will often find yourself reading and calling older code that deals with corner cases and language features you don't understand.

      Well that's hardly fair. If you're comparing to a language invented yesterday, it would be fairer to ignore all teh code written before yesterday. In the new language you have no choice but to write the new code from scratch. You can do that equally well in C++ if you like.

      2. C++ has a preprocessor and header files. In the time it takes to compile a three million line C++ program, you can compile a three million line Go or D program and build a two car garage.

      Oh gosh yes. Roll on C++ modules. That said, switching on the optimizer doubles the compile times, so for building optimized code I assume the language has little to do with it as that's all back end stuff.

      This is a headache that will never go away.

      Never completely, but I suspect in a lot of code it will. The standard library will be modularised off the bat, so any new code will not suffer from this problem nearly as much.

      There's always the problem of old libraries. I expect that will fade over time. Large, popular libraries will be turned into modules. Less popular ones won't, but if the compile time speedups are anything like what's promised, I suspect a lot of happy C++ programmers will be working on conversions.

      --
      SJW n. One who posts facts.
    51. Re:Finally! by Megane · · Score: 1

      Builds in Go 1.5 will be slower by a factor of about two.

      Go! Back! (I should go check TDWTF forums to find some threads about this.)

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    52. Re:Finally! by AmiMoJo · · Score: 0

      And the common thing about those is all of them are OLD. Sure there are new parts, but they were all started a very, very long time ago when C did have major advantages over C++...

      [snip]

      Back in '94 when they tried compiling Linux in C++ and it went slower, well, then C had advantages over C++. That was over two decades ago. The world has moved on since then.

      It's not really a question of it will compile to faster code, or how old the OS is. It's more fundamental. You don't want garbage collection going on in your kernel, for example. Especially if your kernel needs to run on systems with limited resources, or where real-time/low latency response is required. So if you rule out anything that uses garbage collection, there goes half of C++. Now you have to worry about programmers accidentally using those banned features too.

      It's not just GC of course. C++ is designed to use one heap. One stack. For that matter, the GC itself is global.

      C++ just isn't suitable for writing kernels. People have tried to create them in C++ and failed to produce anything worthwhile. Curiosities and teaching tools at best.

      And as for OSX, well, parts of the kernel are written in C++, and in fact the device driver layer supports it. It's a subset, which doesn't allow any of the bits requiring significant support from the runtime

      I'm no expert, but my understanding is that like most modern operating systems, on OS X drivers are running mostly outside the kernel and at a fairly high level. That helps improve stability and security, and also allows them to be a bit more flexible and support some C++ features. In any case, all the core kernel stuff is C, or C++ stripped down so far as to be basically C anyway.

      Many of the big "applications" on my machine that I regularly use are written in C++. There's firefox, Eagle CAD, Libreoffice, IAR embedded workbench, inkscape, okular not to mention GCC 5. Oh and the JVM of course. And unity (the game engine) is itself written in C++ even if most of the game code is C#. Oh and llvm. I almost forgot about that!

      Note that I didn't say it wasn't popular, just that it isn't great. What tends to make it popular are things like speed, portability and the fact that there are vast libraries of code it can make use of. A lot of programmers are familiar with it too.

      It's interesting to note that the apps you listed all have long histories, dating back to the 90s. Even Inkscape is a fork of a fork that as best I can tell was originally created around 1996. LLVM was just before the start of the millennium. Okular can be traced back to xpdf, which was first released in 1995.

      Depending on what you want to do, there are better languages. Scripting languages are great for a lot of internet stuff, for example, because they have a lot of security built in and are thus less prone to critical flaws than C++ apps. There is a reason people stopped using CGI and moved to scripting languages on the web. For desktop you have a number of choices. C# is pretty damn good actually, and Java apps run on more mobile devices than all the desktops put together. Even Objective C/Swift, if you don't care too much about cross platform.

      C++ is still widely used, it's just not the best choice in most cases. Well, not the best choice objectively, but if the only developer only knows C++... You know what I mean, there are caveats.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    53. Re:Finally! by Anonymous Coward · · Score: 0

      Compared to C++, C is a clumsy anachronism. Speaking as a C expert and someone who still writes a lot of it. C is bad news for maintainability and abstraction.

      C might be bad for maintainability. The problem is that there aren't enough C++ projects that has been around for long enough that are still maintained to make the same call there.
      As for Go it is still the flavor of the week. We won't really see where it is going for another decade or so. Perhaps it has been replaced with the next latest greatest by then.
      Perhaps assigning a pointer with an array will be deprecated in C too then.

    54. Re:Finally! by jcr · · Score: 1, Troll

      as long as you use an appropriate subset

      That's what we call "C".

      The only think C++ has going for it is the fact that you don't have to use it all.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    55. Re:Finally! by jcr · · Score: 1

      your understanding of C++ is insufficient.

      You know, that's what people have told me about Scientology, Communism, and Christianity, too. Still not buying it.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    56. Re:Finally! by MSG · · Score: 1

      C is an excellent system programming language and nothing else has managed to supersede it. All major operating systems are written in C, including Linux, the BSD/MacOS kernel and the Windows kernel.

      Both the XNU kernel (OS X and iOS) and Windows kernel are written, in part, in C++. A subset of C++, in both cases, to be fair, but C++ all the same.

    57. Re:Finally! by jcr · · Score: 1

      It's near perfection as a language.

      You really need to get out more.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    58. Re: Finally! by jcr · · Score: 1

      Request denied. Try to work it out in therapy.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    59. Re:Finally! by serviscope_minor · · Score: 1

      It's not really a question of it will compile to faster code, or how old the OS is. It's more fundamental. You don't want garbage collection going on in your kernel, for example. Especially if your kernel needs to run on systems with limited resources, or where real-time/low latency response is required. So if you rule out anything that uses garbage collection, there goes half of C++. Now you have to worry about programmers accidentally using those banned features too.

      Wait what? C++ doesn't have garbage collection. But never mind that, no one says you have to use ever feature in ever situation. C++ runs just fine on tiny little Atmel MCUs. Things don't get a whole lot more resource constrained than that (they do, but the bottom is not far below).

      Actually you're talking about the memory model here. For all intents and purposes, C++ has precisely the same memory model as C. So if C is suitable, so is C++ and if C++ isn't, neither is C.

      C++ just isn't suitable for writing kernels. People have tried to create them in C++ and failed to produce anything worthwhile. Curiosities and teaching tools at best.

      I've never heard a good reason why C++ won't work in the kernel. And as far as displacing one of the major kernels in visible places: that's unlikely to happen. And they all predate good C++.

      And I must say eCOS seems to work just fine. It's a small kernel for resource constrained embedded systems written in C++. And then there's Symbian, another C++ kernel which ran the early generations of smartphones and to date is the only kernel able to run the baseband processing and UI code on the same core.

      Note that I didn't say it wasn't popular, just that it isn't great. What tends to make it popular are things like speed, portability and the fact that there are vast libraries of code it can make use of. A lot of programmers are familiar with it too.

      You didn't say that you specifically said there are better alternatives. That's a different claim. I can list many many bad things about C++.

      It's interesting to note that the apps you listed all have long histories, dating back to the 90s. Even Inkscape is a fork of a fork that as best I can tell was originally created around 1996. LLVM was just before the start of the millennium. Okular can be traced back to xpdf, which was first released in 1995.

      That's true. So I suppose the above argument applies. There are a few major applications written in other things. You've got Eclipse and Atom, for example. Atom has the rare property of making eclipse look svelte, not something Eclipse is usually known for.

      It's interesting that we keep talking about old programs, as programs with a long history are particularly visible. This is of course one huge advantage of both C and C++: they have an actual standards body and they care about stability. This means you can have very long lived projects.

      Depending on what you want to do, there are better languages. Scripting languages are great for a lot of internet stuff, for example, because they have a lot of security built in and are thus less prone to critical flaws than C++ apps. There is a reason people stopped using CGI and moved to scripting languages on the web. For desktop you have a number of choices. C# is pretty damn good actually, and Java apps run on more mobile devices than all the desktops put together.

      And yet, all the high performance code is written in C++. I've actually worked on mobile games a little. They were done in C++ for performance reasons, and trust me, the code needed every ounce of performance it could get. It was written in C++ because that's the only language with the combination of expressiveness (makes it easy to write), performance and portability which currently exists.

      As for web stuff, I gather Facebook writes a lot of their web-facing code in C++ these days.

      C++ isn't perfect and it's not the best language for every circumstance, but it's better than C basically everewhere and a fair bit better than a lot of other languages in an awful lot of places.

      --
      SJW n. One who posts facts.
    60. Re:Finally! by DuckDodgers · · Score: 1

      Good point on your criticism to my first comment. Old C++ libraries are baggage that newer languages don't have, but clean slate new C++ programs can ignore old libraries as easily as new languages can. I was hypocritical with that argument and didn't notice. Thanks.

      I would assume that for developing most code, unless you're hitting specific performance-related problems you need to debug, you do most of your compiling without the optimizer. Once it's more or less feature complete, then you have a few optimized builds before release. But even so, I work in web development. Python and PHP may not be finished getting out of bed for a day of number crunching when when C++ is already in the bar enjoying a beer, but with web work when you're accustomed to a recompile and re-deploy cycle of "Ctrl-s, Alt-Tab, F5" it makes working with C++ feel like sticking thumb-tacks into your face.

      In terms of abstraction levels and such, that's a whole separate discussion or debate. I've swung around to the Clojure community philosophy of working with the simplest possible data structure that gets the job done. See for example the video https://www.youtube.com/watch?... - of course I don't know the particulars of your work so I would be foolish to assert without specific evidence that you're doing something wrong by making your own data structures. Clojure supports interface-based polymorphism and you can even use Java's inheritance-based polymorphism too, but the best practice method is to work as much as possible with sets, vectors, lists, maps (aka associative arrays) and keywords (enums). By staying at that level as much as possible, you have code that's much easier to inspect and reason about, and you get a staggering amount of libraries that will work on your data as-is instead of using the Visitor pattern and the Strategy pattern and the Decorator pattern and all of those other Design Patterns that provide wonderful fixes to one problem at the cost of requiring lots of extra work to interact with other code. So maybe Go with the simple data structures and the right code would do your work well - minus any performance deficits, of course - but maybe not.

      I hadn't followed the evolution of the D language much. I stumbled across the language a few years ago when D 2.0 seemed relatively stable. I admit, I would have been furious if I had been an early adopter of D 1.0, because the transition between 1.0 and 2.0 was enormous.

    61. Re:Finally! by caseih · · Score: 1

      Actually GTK+ is quite maintainable, both in terms of the toolkit development itself, and app development. The patterns it uses are easily seen, and replicated, and also easily automated. For example, to gobject-based toolkit code is often automatically generated from more abstracted definition files. GTK+ is definitely not an embarrassment, nor is it haphazard.

      The biggest problem with C++ is language bindings, and also a the lack of a standard ABI. Unless things have radically changed recently, I cannot use MingW G++-compiled object code with Visual Studio's C++ compiler. And from a language binding point of view, C++'s OOP does not easily map well to many other languages. This often means writing a lot of C wrappers to thunk C++ that can then be imported into a language like Ruby, Python, or Perl. C-based libraries are easy to import. GTK+ happens to bind well to other languages because they implemented a fairly straight-forward object model (no multiple inheritance).

      I have no idea what you mean by "As far as C compiling itself goes, GCC won't be doing that any more, it is moving to C++." Are you talking about the compiler itself? I know LLVM is written in C++, but I don't think GCC's compilers are, nor do I think they are likely to move that way.

    62. Re:Finally! by Anonymous Coward · · Score: 0

      It's interesting to note that the apps you listed all have long histories, dating back to the 90s. Even Inkscape is a fork of a fork that as best I can tell was originally created around 1996. LLVM was just before the start of the millennium. Okular can be traced back to xpdf, which was first released in 1995.

      And he doesn't mention the bloat...e.g. the current Incarnation of Inkscape takes longer to reach a state of usability on this machine than Coreldraw X7.

    63. Re:Finally! by Anonymous Coward · · Score: 0

      Multi-dimensional array syntax, there where() statement, and in/out/inout declarations are the three things that fortran does right. That's not enough to make me not wish it would all spontaneously vanish from every disk on earth one night, because there's so much Fortran code out there from a time when Fortran was actively, violently hostile to everything we've learned about good code design.

      The future looks like CUDA if you ask me: Shitloads of cores, set up in small groups that you drive as a bunch of itty bitty SMP systems. A K-80 is like a 32-node cluster with 32-core SMP per node... On a chip. With the vast advantages of bandwidth and latency that implies.

      And for the lunatics like me, PTX parallel assembly! Protip: NVCC is allergic to FMA instructions, so (IF you understand why NVCC is scared of them) you'll reliably be able to beat the compiler by 20+%.

    64. Re:Finally! by serviscope_minor · · Score: 2

      That's what we call "C".

      Yes, because templates compile in C just fine.

      I also love all the really helpful algorithms you can get by including algorithm in C.

      --
      SJW n. One who posts facts.
    65. Re:Finally! by Anonymous Coward · · Score: 0

      Hey, haven't you noticed the decades of hack-proof code written in C++, ensuring that you don't have to worry about the security of your PC on a daily basis. Oh, wait- all those SUPPOSEDLY beneficial aspects of C++, with respect to code security and correctness, have NEVER manifested themselves in reality. And WHY? Because C++ encourages LAZY coding, where the coder assumes the language will do all the thinking for them.

      All the obvious improvements of C in C++ are a GOOD idea. All the 'clever, clever' stuff in C++ is a BAD idea, and properly belongs in a language NOT meant for practical to-the-metal coding. If you must use a language that does the thinking for you, it should NOT inherit from C.

    66. Re:Finally! by Tough+Love · · Score: 1

      If you think that decent memory management is the only reason to use c++ then you certainly do not get it.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    67. Re:Finally! by Tough+Love · · Score: 1, Insightful

      Linus has no experience with c++, and until he does get some experience, he will maintained the c++ ban. Remember, Linus also banned version control for many years. Finally, he got it, and became a great proponent.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    68. Re:Finally! by caseih · · Score: 1

      Ahh, it looks like GCC development is slowly moving to C++.

    69. Re:Finally! by maestroX · · Score: 1

      And replacing it with something slower.

      Any plausible improvement for C would require memory management and extra run-time checking.
      Maybe a different hardware model tuned to multithreading would get a faster language.

    70. Re:Finally! by maestroX · · Score: 1

      If there are vastly superior languages out there for what I do, then let me know, because I'd love to use them.

      Self-regurgitating assembly with macro's.
      I could try and explain, it's just too powerful and expressive.
      Its purity and speed would leave you alone and crying for mommy.
      Variadic pointers and memory strategy? Who cares, assembly INVENTED virtual endless memory.

      Of course, when things need to get done, you fetch any script- /garbage collected lang is available and supported in vi/emacs/whatever.
      C++ is only superior in the feeling you never get to master it.

    71. Re:Finally! by Tough+Love · · Score: 1

      All major operating systems are written in C, including Linux, the BSD/MacOS kernel and the Windows kernel.

      The Symbian kernel is written in c++, proving that that there is no technical obstacle. The real reason that (nearly) all major kernels are written in C is that these kernels predate the time when c++ was suitably mature. Things have changed. OSv is an example of a new kernel written in c++. A bit simplistic at the moment, but then so was Linux when it arrived on the scene.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    72. Re: Finally! by Anonymous Coward · · Score: 0

      we need faster ways of exposing our secrets to vladivostok mafiosi !

  14. No generics by renzhi · · Score: 4, Insightful

    I was playing with it when it just came out, and wow, the compiler was fast. It was great and all. So to find out how much I can do or to figure out my own skill level in Go, I started to port one of my C++ libraries to Go. That library has made heavy use of tree and trie data structures, which were implemented as template in C++. Then, bang, I hit a wall with Go. How to do generics? There was no way to do it. Looking on the web, I even saw someone create a kind of "compiler" to generate different code set for different types, say, you want a b-tree for class A? Fine, one set of code for that. Want a B-tree for class B? Fine, another set. Using his tool, I ended with five or six different sets of duplicated code, and I had a few more to go. That's when I stopped using that language.

    1. Re:No generics by Anonymous Coward · · Score: 0

      If du think compile/link speed ist importantest go with csharp. All the kool kats are. The time you have left is the time you have left to be a kool kat.

      viva
      peace
      love
      understanding

    2. Re:No generics by Tough+Love · · Score: 1

      I expect that the Go compiler written in Go compiles slower than the Go compiler written in C, however the Go-in-Go compiler is undoubtedly more loved by the devs, which counts for a lot. Over time, it is probable that the optimizer will develop faster in the Go-in-Go version, which if true, means that the Go-in-Go version will ultimately be superior.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    3. Re:No generics by Anonymous Coward · · Score: 1

      I looked at it today to see what the fuss was about. Here's a foreach loop:

      values := []int {1,2,3,4,5}
      for _, value := range values {
      }

      There's this funky little underscore sitting in there. It doesn't do anything. If you're gonna go about writing your own programming language, at least you could make sure it doesn't have any errata. They could really clean that declaration up to make it more legible. They could start by removing the offensive underscore:

      for value := range values { }

      To go a step further, they could condense the short assignment and range keyword into a single thing, like maybe "in"?

      for value in values { }

      Oh, wait....

    4. Re:No generics by ustolemyname · · Score: 4, Informative

      Underscore is ignore. for loops operate in a key/value fashion, so:

      for key, value := range values
      gives you:
      0, 1
      1, 2
      2, 3
      etc.

      In practice this turns out to be very convenient. You can switch storage between slices and maps without altering your code (both use the same key, value := range x form), and I know that your example above doesn't modify anything stored in values without having to look past the loop declaration.

    5. Re:No generics by Anonymous Coward · · Score: 0

      That makes a lot of sense.

      So often I type something like this in Perl:

      foreach $var (@array) {

      Only to eventually decide that I need the index number into the array for one reason or another, at which point I have to convert it to a normal for() loop, then assign to $var from the array within the loop, which after having done that enough times, I rather prefer to forget that foreach() even exists.

      Similarly, Perl's rejection of statements like "if (x 4) exit;" because it wants me to write "exit if x 4;" is a constant pain in the ass when I later decide that I need more than one thing to happen when x 4, and so I first have to reverse the statement to resemble the first syntax, whereas with the first syntax (as C allows) I can just type a { in front of "exit," then press enter to move "exit" to the next line, and I'm good to go.

      Having too many ways to do something cab be as much of a pain in the ass as having too few. That's kind of why I hate C++. I can look at a snippet of C code and figure out what it does, but any snippet of C++ code is likely gibberish without looking at numerous macros, class definitions, and documentation for subsets of the language I've never seen before.

    6. Re:No generics by Anonymous Coward · · Score: 0

      Maybe they could improve the language by making it be interpreted, using a broken paradigm like ref-counting for GC, and failing to handle concurrency due to a honking great global lock. Oh, wait ...

      But congratulations on discovering that iteration over a set is universal. Maybe one day you'll discover the reasons why different languages have different keywords and syntax. Today is obviously not that day.

    7. Re:No generics by brantondaveperson · · Score: 1

      I can look at a snippet of C code and figure out what it does, but any snippet of C++ code is likely gibberish without looking at numerous macros, class definitions, and documentation for subsets of the language I've never seen before.

      Nonsense. You hate C++ because you don't know it, which is presumably because you've never taken the time to learn it. It's not that hard, and it's vastly superior to C. Best thing : you never have to use macros again.

    8. Re:No generics by Anonymous Coward · · Score: 0

      Oranges... Apples... Trey're all tasty in their own way.

    9. Re:No generics by Anonymous Coward · · Score: 0

      I feel the same way about C++... to me it's just mostly gibberish, tricky to read syntax, hard to figure out what's going on at times, and every programmer knows and uses a slightly different 10% of the language. Nearly every api or framework has its own tricks to wrap and hide things, uses different standards, different libraries (is boost good or bad or good or bad?), etc. I admit I don't know it that well at all (which is definitely a fair enough call by the parent to the grandparent poster), but I find less 'fiddly' languages and frameworks like C#/.Net are much nicer to develop with.

      Not a holy war, just a personal opinion :)

    10. Re:No generics by Anonymous Coward · · Score: 3, Insightful

      Quick, what does "A=B;" do in C++ without checking through tons of class definitions and functions!

    11. Re:No generics by Anonymous Coward · · Score: 1

      Yes you get to use Templates which are worse.

    12. Re:No generics by Anonymous Coward · · Score: 0

      I hate C++ due to it's adherents - instead of admitting that parts of the language are horrendously over complicated and could do with rationalisation, they take them as a point of pride, use them as a shibboleth for membership of the Super Autism club, and then try and lord it over anyone who's too sensible to join them.

    13. Re:No generics by goose-incarnated · · Score: 2, Interesting

      I can look at a snippet of C code and figure out what it does, but any snippet of C++ code is likely gibberish without looking at numerous macros, class definitions, and documentation for subsets of the language I've never seen before.

      Nonsense. You hate C++ because you don't know it,

      Neither do you, apparently. C++ (the language, not the library) is the largest programming language in existence. Nothing is larger. If you think you know C++ then you're way too dangerous to be on a team. The best C++ devs I've managed were those who openly acknowledged the fact that it is too large and too complicated to be used without sticking to a strict subset of some sort.

      --
      I'm a minority race. Save your vitriol for white people.
    14. Re:No generics by Anonymous Coward · · Score: 0

      When Rob first talked to me about Go, even before it was announced, that was my first objection to his plan, and it still remains my only objection.

      To his defence, generics is complex and his primary goal was to be able to compile crazy fast, because, you know, Google has crazy amounts of code it compiles ALL THE TIME. CPUs have become so fast that it's now less of an issue and the C++ language has matured immensely so I'm not sure it makes that much sense now. Anyhow, lots of stuff is built on Go now and I keep on being told that you don't need generics to which I'm still unconvinced but maybe I should build something non-trivial and see.

      ... posting as anon 'cause I'm a coward.

    15. Re:No generics by Anonymous Coward · · Score: 0

      It assigns B to A.

      If you can't tell what B and A are just by their name, or if the assignment is programmed to do unexpected things behind your back, that's not the language's fault. That's your team being retarded.

      You can make a mess in any language. It's not the language's job to prevent insane code, it's the programmer's.

    16. Re:No generics by The+Evil+Atheist · · Score: 1

      Uh no, you only have to check one. A's class' assignment operator.

      Your imagined problem exists with C functions that uses handrolled (or macro rolled) vtables just the same.

      --
      Those who do not learn from commit history are doomed to regress it.
    17. Re:No generics by Anonymous Coward · · Score: 0

      Quick, what does "A=B;" do in C++ without checking through tons of class definitions and functions!

      Simple: It assigns B to A. Nothing more, nothing less.

      I think you do not understand the reasons for overloading the assignment operator.

      It should be used in order to improve readability, so that an operation, that is basically an assignment, can be written as such. Inside the body of the assignment operator you can hide the nasty details that are nessesary, in order to do that what is basically an assignment. So the reader of the code sees only the essential part, and that is an assigment form B to A.

      The way you seem to see it, "...oh this looks like an assignment, but it could also be something completely different. Let's check..." is definetly the wrong approach.

      As a coder, I will overload an operator only if it improves clarity, and I simply refuse to assume that there are awkward overloads in place when reading someone elses code.

    18. Re:No generics by Daniel+Hoffmann · · Score: 1

      Generics are a touchy subject, they make the code awful but they save you from writing more of it. As a side note C++ does just that with its generics implementation (the compiler creates a different code for each class that uses the generic class) that is why C++ compiler is slow. Java does not do that in its generics implementation, but the Java way has its own trade-offs.

    19. Re:No generics by serviscope_minor · · Score: 1

      Quick, what does "A=B;" do in C++ without checking through tons of class definitions and functions!

      Quick! What doea a.assign(b) do in any other language? Without checking the definition of a or b in those languages, of course?

      Don't know? Well obviously all those language suck.

      Hopefully you see now why your point is silly.

      --
      SJW n. One who posts facts.
    20. Re:No generics by The+Evil+Atheist · · Score: 1

      C++ is only a large language if you are looking to implement something very generic, like the STL. If you're just using a library like the STL, it is not large. In fact it is quite a small library, in terms of surface area, and all of the "advanced" language stuff is there for the library implementers to squeeze the last bits of performance out of a generic library.

      The C++ devs you've worked with you claim are "the best" probably are the ones trying to use C++ as C with classes or learned C++ from university that teaches even pre-1998 C++. In modern C++, the "strict subset" is about letting the compiler do the work (through RAII, algorithms and type deduction), rather than the C subset of C++. That is what it means to "know" C++.

      --
      Those who do not learn from commit history are doomed to regress it.
    21. Re:No generics by serviscope_minor · · Score: 3, Informative

      Neither do you, apparently. C++ (the language, not the library) is the largest programming language in existence. Nothing is larger.

      [citation needed]

      A clue: there is no citation because you're making it up.

      So let's consider languages where actual formal specifications exist because they have to be written in excricuiating detail because the asusmption there is no reference implementation that people can refer to if in doubt.

      Java spec (788 pages, for the language only):

      https://docs.oracle.com/javase...

      C++ spec (425 pages, for the language only):

      http://open-std.org/jtc1/sc22/...

      C# circa 2006 language specification (553 pages for the language only)

      http://www.ecma-international....

      So there you go, definitive proof that there are bigger languages than C++.

      Huh, looks like ADA and Fortran 2008 have longer specs too.

      So there you go, there are 4 standardised languages I've given you which have longer specifications than C++.

      The best C++ devs I've managed were those who openly acknowledged the fact that it is too large and too complicated to be used without sticking to a strict subset of some sort.

      Given your propensity to simply make shit up about C++ [citation: see above], your statements lack credibility.

      --
      SJW n. One who posts facts.
    22. Re:No generics by zwarte+piet · · Score: 1

      Imagining this to be said in Arnie's voice.

    23. Re:No generics by zwarte+piet · · Score: 1

      You must be new here

    24. Re:No generics by zwarte+piet · · Score: 1

      Kinds of like shopping: Who buys every item in the store? Yet someone else might like the stuff you skip.

    25. Re:No generics by goose-incarnated · · Score: 4, Informative

      Neither do you, apparently. C++ (the language, not the library) is the largest programming language in existence. Nothing is larger.

      [citation needed]

      A clue: there is no citation because you're making it up.

      So let's consider languages where actual formal specifications exist because they have to be written in excricuiating detail because the asusmption there is no reference implementation that people can refer to if in doubt.

      [snipped...]

      So there you go, there are 4 standardised languages I've given you which have longer specifications than C++.

      Well Done. Now, where exactly did I claim that the english-language specification for C++ is larger than the english-language specification for other languages? I claimed that the language "C++" is larger, but only a moron would use number of pages of english text as a measurement.

      The C++ language, as defined by its grammar rules in BNF, is larger than any other programming language, as defined by their respective grammar rules in BNF. This is well-known and is taught in almost every introductory compiler class I've reviewed.

      Go ahead - look it up. Here's the BNF rules for java, 48 general rules for the programmer to remember, very few depending on context. Here's the one for C++, 80+ rules for the programmer to remember, many of them depending on context.

      I'm not going to do your homework and search for the grammar rules for the other languages which you claim are bigger than C++; just refuting the one you listed is enough for you to ask yourself "Whats a BNF and why does it determine the size of a language?" If you do not get the relationship between "this is how much language a programmer needs to keep in their head to program" and "this is how large the BNF for the language is" then I'm afraid you are beyond my (and most professional) help.

      (Hint: maybe register for some CS course in programming languages and compiler design? Or write a compiler or two yourself? You would do yourself a favour and learn enough to not use "number of pages in spec" as a measurement of a languages size (and/or complexity, but I didn't even start on that))

      Given your propensity to simply make shit up about C++ [citation: see above], your statements lack credibility.

      Your nerdrage whenever you perceive an attack on "your" language is laudable, however I suggest you stop being so unreasonably attached to what is only a programming language (albeit a very large one). C++ is what it is. Your insults won't change that.

      --
      I'm a minority race. Save your vitriol for white people.
  15. Re:Sucks they're dividing efforts between Dart &am by 91degrees · · Score: 2

    Google UK does give the language as its first hit, but also gives a bunch of darts clubs.

    I guess it's not too bad. Programmers tend to be very active online, so the languages tend to get high pagerank. But still, if I were to create a language, I'd going to go for either a really obscure word, or a misspelling. I think searchability should be considered a feature.

  16. Re:Sucks they're dividing efforts between Dart &am by Anonymous Coward · · Score: 0

    To me it's Dodge, and i'm not talking about some 2015 Dart.

  17. Re:Sucks they're dividing efforts between Dart &am by bledri · · Score: 4, Informative

    Dart is an awesome language, and we have nearly a million lines of it running both client-side web and server-side. It is a spectacular language. Go is probably better on the server side, but you can't ignore the web. Imagine how much nicer Dart could be if they weren't distracted by Go.

    Google has over 50,000 employees. They can do more than one thing at a time.

    --
    Some privacy policy Slashdot.
  18. Re:Sucks they're dividing efforts between Dart &am by Anne+Thwacks · · Score: 2
    They can do more than one thing at a time.

    A lot of people on this thread evidently think the jury is still out on that.

    --
    Sent from my ASR33 using ASCII
  19. Re:Sucks they're dividing efforts between Dart &am by Anonymous Coward · · Score: 0

    You wouldn't happen to have lived in or around Dallas during those years, would you? I strongly suspect this to have been the case.

  20. Or what it's stance on the Confederate Battle Flag by Anonymous Coward · · Score: 0

    spineless

  21. IOW: Go is now self-hosted by T.E.D. · · Score: 4, Informative

    Having the compiler for a language written in itself is what pretty much every serious compiler is expected to do. Its called being self-hosted, and a compiler is generally not considered very mature until it does this.

    So basically what this is saying is that Go has started to grow up.

    1. Re:IOW: Go is now self-hosted by Anonymous Coward · · Score: 1

      It also means we have to trust someone's binary blob to bootstrap the compilation of the Go compiler, making a Ken Thompson hack possible. Previously we only had to trust a C compiler binary blob, which is smaller, so easier to audit, and likely already audited because a C compiler is generally more useful.

    2. Re:IOW: Go is now self-hosted by tepples · · Score: 1

      I think the idea is that you use old Go to bootstrap new Go, just as you use old g++ (prior to 4.8 when it became self-hosting) to bootstrap new g++.

    3. Re:IOW: Go is now self-hosted by T.E.D. · · Score: 1

      No, at some level you have to trust a binary no matter what. The only thing changing here is which binary that is. That was the whole point of Ken's address.

  22. Major release or not? by Anonymous Coward · · Score: 0

    TFS says: the sixth major stable release of its Go programming language Go 1.5. VB reports: "This is not a major release

    Did the submitter not read the text they quoted?

  23. Can we Kickstart a betting pool? by Applehu+Akbar · · Score: 3, Funny

    On when Google will suddenly back out of this language project - or both of them, as the case may be - and just go with Swift?

    1. Re:Can we Kickstart a betting pool? by Anonymous Coward · · Score: 0

      This particular project is fully OSS, so even if Google gives up, others can continue.
      As well, considering Rob Pike and Ken Thompson are involved, and they aren't exactly flakes, I am willing to give Go a bit more of an optimistic outlook than other Google projects.

  24. Awesome Troll by Anonymous Coward · · Score: 0

    On point with today's hipness, hilarious, and look at the SJWs antagonized by this thread and JCR.

    This post deserves more than the usual Score:5, Funny. It's at least a 6 maybe a Score:7, Hilarious.

    LOL

  25. What Is Go And What is It For? by Anonymous Coward · · Score: 0

    Yea, I know what it is. But, what is it for? Is it just another crappy language or is it something worthwhile? Does it have any serious momentum? Should anyone outside of Google be looking at it, or is it just another "me too" language while C, or C++, or Java, or Python already satisfy all the needs.

    I've only got so much storage in my head and keeping track of all the language variations/deviations, syntaxes, and idiosyncrasies is slowing me down and strarting to really piss me off.

  26. Re: Sucks they're dividing efforts between Dart &a by robi5 · · Score: 1

    A modern computer language should have a unique name. On this basis I predict that Clojure will prevail, and Go and Dart will fade into obscurity. ECMAScript will be fine too, though when I search for Javascript, I always get hits for this weird language called jQuery and Google Search, as it is getting worse and worse, no longer recognizes the dash as an 'exclude' filter.

  27. Re: Sucks they're dividing efforts between Dart &a by robi5 · · Score: 2

    Yea, that's almost 2000 persons per letter of the Alphabet.

  28. The beauty of C++ by ajyand · · Score: 1

    The beauty of C++ is that it supports unlimited design patterns. Boost showcases so many of them. More are yet to be discovered. More will be made possible with future revision of the language.

    1. Re:The beauty of C++ by Jeremi · · Score: 0

      .... and the horror of C++ is that it supports unlimited design patterns. Therefore C++ programmers are doomed to spend their lives learning new design patterns rather than getting productive work done. ;)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
  29. iostream is a pig by tepples · · Score: 0

    [The language used to implement parts of the OS X kernel is a C++] subset, which doesn't allow any of the bits requiring significant support from the runtime (exceptions, RTTI/multiple inheritance)

    But what are the advantages of this subset over C?

    [C++ is] better than C in pretty much every single regard[*].
    [...]
    [*] The only regard in which it's not is that a few obscure platforms don't have a C++ compiler.

    That and machines without enough memory to hold "significant support from the runtime". I tried compiling Hello World for a Game Boy Advance using a cross-GCC that targets Thumb. Because the GBA BIOS lacks an implementation of the C++ standard library, I had to statically link GNU libstdc++. I wrote two Hello World programs in C++: one using <cstdio> and one using <iostream>. The one using <cstdio> was 6K, including a statically linked terminal emulator, while the using <iostream> was 180K bytes, even after turning on -Wl,--gc-sections to enable more aggressive pruning of unreachable code. That was a big chunk of memory on a platform with only 256K of main RAM, 32K of fast RAM, and 96K of video memory. I debugged into it, and it turned out that the constructor for std::cout was constructing objects to represent locale-specific formats for date, time, and currency types despite that my program printed none of those types. I repeated the experiment with MinGW, a port of GCC to Windows (x86), and got comparable sizes.

    1. Re:iostream is a pig by serviscope_minor · · Score: 5, Insightful

      But what are the advantages of this subset over C?

      Better encapsulation, better type safety. better expressivity, much, much cleaner and more typesafe generic code. Oh and finally, C++ does things like virtual functions in a more memory efficient way that the idiomatic C way on modern processors.

      And of course there's constructors which maintain your class invariants for you. Every time you declare a struct variable in C and then initialise it, you're writing boiler plate that C++ does for you. And every line of code is a potential bug. Having fewer lines means generally fewer bugs.

      That and machines without enough memory to hold "significant support from the runtime".

      The arduino environment is C++ and runs on an 8 bit Atmel with almost no RAM. I'm using IAR C++ workbench on some diddy little 8051 radio core with as few k.

      All you've managed to do is to prove that part of the C++ standard library doesn't work well on tiny devices. You also proved that C++ is just fine, by running a C++ program with a different library to do the same kinds of tasks.

      But yes, iostreams is not the highest point of the C++ standard.

      --
      SJW n. One who posts facts.
    2. Re:iostream is a pig by Megane · · Score: 1

      Of all the things which I would ditch from C++ for embedded systems programming, iostreams is first against the wall. It's not just a pig, it's also a shameful show-off example of "stupid overload tricks".

      Of the things I love the most, it's how virtual functions compare to using function pointers. The syntax for C function pointers is mind-bending. Virtual functions replace the best use case for function pointers, with a straightforward syntax, and the vtable means they all get assigned together for a given class, which is important for encapsulation.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    3. Re:iostream is a pig by Anonymous Coward · · Score: 0

      Hello World Win32 asm in 3K!

      chris lukehart

  30. Re: Sucks they're dividing efforts between Dart &a by MemeRot · · Score: 1

    Microsoft at one point came out with 'web pages'. The name instantly doomed it. You couldn't search for it at all

  31. But when are they going to stop using ONES + ZEROS by Anonymous Coward · · Score: 0

    I know, that it's perhaps bad advertising if your language's compiler is written in a different language. And I supposed it's good to know that your language can handle the job of coding a compiler.

    But really, it doesn't matter if your C compiler is written in Fortran77, or Cobol, or ADA, or Lisp. If it compiles correctly, it's doing it's job, and in the end that's what matters. If it also happens to be able to optimize the code to run faster (while still being correct), then it's even better.

    In the end, it's all ONES and ZEROS.

  32. Punching down: sign of a weak mind by Anonymous Coward · · Score: 0

    Also very brave!

  33. For a language thats supposed to replace C by Viol8 · · Score: 1

    ... and be used on server side development, support for shared libraries should have been built in from version 0.1.

    1. Re:For a language thats supposed to replace C by Anonymous Coward · · Score: 0

      Why?

  34. C++ is great when used as a better C by Anonymous Coward · · Score: 0

    When the reason for using C++ is to have access to a very improved C, C++ is great. When C++ is used to benefit from all the idiotic clever-clever crap added across the years, C++ is a STUPID choice over languages designed to be clever-clever from day one.

    One will hear FOUR stories about C++ because of the type of coders who need a good language. Ill-informed and informed C coders give two stories. Ill-informed and informed maximum abstraction coders give another two stories. FOUR points-of-view who see C++ in very different ways. But only the two informed groups get it right. Namely use C++ as a better C, but NEVER as a sensible maximum abstraction language.

  35. Re:But when are they going to stop using ONES + ZE by Anonymous Coward · · Score: 1

    Dumbshit learn to use language names correctly.
    FORTRAN77 not fortran77 asshole
    COBOL not cobol asswipe
    Ada not ADA dipshit
    LISP not Lisp dumbass

  36. Languages-A-Go-Go by tarlek1234 · · Score: 1

    Hopefully they will ditch Go next.

  37. Re:Sucks they're dividing efforts between Dart &am by KGIII · · Score: 1

    Philip, you forgot to log out on Google before taking your screenshot.

    --
    "So long and thanks for all the fish."
  38. Re:Sucks they're dividing efforts between Dart &am by painandgreed · · Score: 1

    Google has over 50,000 employees. They can do more than one thing at a time.

    Yes, but do they have enough to move any of those things out of beta?