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