Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
General Development "For years I've tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I've had intense and torrid love affairs with Java, C++, and Erlang. I've built things I'm proud of with all of them, and yet each has broken my heart. They've made promises they couldn't keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C."
Thread beginning with comment 548480
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: C -> Go
by ebasconp on Sat 12th Jan 2013 04:43 UTC in reply to "RE[2]: C -> Go"
ebasconp
Member since:
2006-05-09

Could you please elaborate on your comment?

D is a systems programming language (like C or C++) but with a very high level of abstraction.

http://en.wikipedia.org/wiki/D_(programming_language)

Edited 2013-01-12 04:43 UTC

Reply Parent Score: 2

RE[4]: C -> Go
by voidlogic on Sat 12th Jan 2013 07:11 in reply to "RE[3]: C -> Go"
voidlogic Member since:
2005-09-03

http://en.wikipedia.org/wiki/Golang
http://tour.golang.org/#1

“Go is like a better C, from the guys that didn’t bring you C++” — Ikai Lan

Ken Thompson, Rob Pike & Robert Griesemer set out at Google to create a modern C. Go is an extremely simple language compared a multi-paradigm language like D. For some people this means worse, for many it means better. For me being simple, yet providing all the tools needed is perfect. IMHO sufficient simplicity is elegance, and leads to maintainable code.

If you Google D vs Go you will find many threads, take a look the discussion; It is much broader than we could hope to cover here. (Keep in mind most results are 3 years out of date)

If I had to make you a short list I would say I like Go because:

* For me personally I have never had a more productive language experience than Go. (I have mostly used C,C++,C#,Java,VB/.net with some Javascript,Perl,PHP,Haskell,Prolog)

* Go makes is easy to get concurrency right on the first pass, and has extremely powerful concurrency features built-in. In Go there is no writing a single threaded version and having come back and multithread it later.

* The entire language spec is small enough to read in one sitting and understand and know by heart in less than one month.

* The Go compiler is extremely fast, faster than C or D

* Go performs very well: http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-bes...

* Language formatting is standardized (gofmt). No more newline flame wars for example.

* While D appeared in 2001 and Go in 2009 D and Go are now neck and neck on stack overflow and github. On OSnews, hacker news, slashdot etc you see many more Go stories. While this does not in and of itself make Go better, if this means Go has a stronger faster growing community, that is positive for developers that choose Go.

I'll stop here and for the sake of brevity. In short D is a better C++ and Go is a better C that believes C++ was a wrong turn.

Reply Parent Score: 3

RE[5]: C -> Go
by Valhalla on Sat 12th Jan 2013 15:22 in reply to "RE[4]: C -> Go"
Valhalla Member since:
2006-01-24


Ken Thompson, Rob Pike & Robert Griesemer set out at Google to create a modern C.

I just can't buy into the notion of Go as a 'modern C'. There are similarities in syntax, not surprising of course when considering who the authors are, but the languages are targeting different areas.

I do like Go, it's a language I am currently dabbling with and I put it somewhere between python and C. I think it has a great future, largely due to the built-in concurrency features you mentioned since the future seems to hold an ever increasing number of cores per cpu.

But in the domains where C dominate, characteristics like high performance, deterministic memory handling, small memory footprint, no runtime overhead, low-level constructs for efficient data manipulation, ease of use from other languages, etc are what makes it so popular.

Go really doesn't apply here, it will never have the same performance due to being a 'safe' language and also due to having automatic garbage collecting which has logic using up cycles even when it's not actively reclaiming memory. It does not have a comparable small memory footprint as it includes the runtime with each binary, it lacks constructs like unions, it lacks a simple bitfield type, in short it is not a replacement for C.

And when I'm talking about domains where C is dominant, I mean things like system-level code, audio/video encoding/decoding, archivers/compressors, low level frameworks, image/sound manipulation etc.

Currently Go is making it's largest splash in web development, part if this is due to some of it's characteristics, part of it likely is that the web developer space is quite prone to experiment with new languages.

However in the longer perspective I can see Go have a 'go' at replacing C++,Java,C# for application level development.

Desktop applications like for example Libre Office, Inkscape, Gimp, etc could easily have their C++ parts replaced by Go while keeping the underlying C performance critical components (like GEGL for Gimp) where it's necessary.


* The Go compiler is extremely fast, faster than C or D

Yes, but it will get slower once more optimizations are implemented. Still they chose to write their own Go compiler from scratch due to finding the LLVM and GCC backends much too slow so there's good reason to believe it will remain quite fast.


Hmmm.. are you are cherry-picking results or am I missing something? Here is the straight-up list:
http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all...

Go is quite a bit slower than Java 7 and much slower than C (which is the fastest overall). Still there is a slew of performance improvements in store for Go 1.1 from what I've read so it will be interesting seeing where it lands once that is released. Certainly the performance isn't bad considering it's a 1.03 release of a very young language, but again calling it a modern C is something I find to be nonsense.


* While D appeared in 2001 and Go in 2009 D and Go are now neck and neck on stack overflow and github.

Cherry-picking D as a comparison is rather pointless I think, it does not have the resources that Go enjoys through Google, also it's development history is so unlike that of Go, with community fragmentation over runtimes and standard libraries etc.

Reply Parent Score: 2