View Full Version : Google Go Programming Language
I'm always on the lookout for new programming languages.
Google is developing a new systems language called Go (http://golang.org/) that looks interesting. Two features that make it particularly interesting are garbage collection and the ability to program for multiple core computers.
It may be another flash in the pan or since Google is behind it, it may develop into an alternative to c++ and java.
fos
danieldk
07-24-2010, 10:50 AM
Google is developing a new systems language called Go (http://golang.org/) that looks interesting. Two features that make it particularly interesting are garbage collection and the ability to program for multiple core computers.
Whats new? Java, Ada, C/C++ (with Boehm GC), D, Haskell, Clojure, Scala, C#, F#, and the list goes on and on... all provide garbage collection and multithreading capabilities. And that's the problem with Go, it doesn't provide many new interesting concepts, and throws away a lot of useful things, such as decent error handling (exceptions, Maybe monad) or genericity (templates, generics)
It may be another flash in the pan or since Google is behind it, it may develop into an alternative to c++ and java.
It's a hobby project of some Google engineers. Doesn't provide much interesting, and has virtually no traction. If you are looking for a better C/C++, (Digital Mars) D is probably it. It is as powerful as C++, but fixes many of its problems. Although it will take a lot (such as industry interest) to replace C and C++.
An article on C++ and Java commented that they have become too bloated. Programmers spend too much time satisfying the compiler. Their "industrial" nature takes away creativity.
Go is based on C for a front end and back end. So in essence, it still boils down to C.
For me, C is hard to beat. C, html, and php are all I'm likely to ever put to functional use. (I think I'm too old to fully embrace object oriented programming.)
fos
The perpetual amateur hobbyist...
danieldk
07-25-2010, 04:52 AM
An article on C++ and Java commented that they have become too bloated. Programmers spend too much time satisfying the compiler. Their "industrial" nature takes away creativity.
With a good IDE and toolkit that's absolutely false. Programming C++ and Qt is as fast for me, as say, Ruby. At some point working out ideas, data structures, and algorithms becomes the most time-intensive task. It's mostly trivial programs that one can write faster in Ruby.
Go is based on C for a front end and back end. So in essence, it still boils down to C.
The backend/frontend languages say nothing. The gcj Java compiler has a C frontend and backend, but Java does not boil down to C.
If you want to see innovation, go to functional languages, such as Haskell. They are fun and truely innovative :).
My point was that it still boils down to C. This language and many other ultimately manipulate C constructs. The fact that C is just about as close to the hardware as you can get short of assembly just about makes it the default language. You can make a fancy knife a simple will cut just as well.
danieldk
07-26-2010, 11:45 AM
This language and many other ultimately manipulate C constructs.
That's the same as stating that every language eventually boils down to assembly. Which is of course, not true. A language can eventually be compiled to C, assembly, LLVM bytecode, or even brainfuck, but that does not preserve the semantics of the language. What makes languages unique are grammar and semantics, for which you need a compiler or interpreter unique to the language. The concept of, say, a C++ template or a Java interface is meaningless in C or assembly.
You can do anything with any language. C is small and concise. You can do just about anything with C. Because of this and because an excellent cross platform implementation is freely available, many languages use it as their foundation.
C++ and Java, the "industrial" languages, are bloated. A programmer must spend a lot of time satisfying the compiler. I guess that is a good thing in an industrial environment.
The future of programming must address multi-core programming. Just about every new computer has multiple cores. That trend is the new upgrade. It used to be speed and memory. To utilize all of the cores, programming languages are going to have help mere mortals.
That is one of Go's core ;) goals. After looking at Haskell, I would have to agree, it is twenty years along in its development and may serve that purpose admirably. I downloaded the GHC Haskell Platform. I going to go through O'Reilly's online version of Haskell programming.
I can do that since for me it is a hobby. Industrial programmers are frequently compelled to use a language due to legacy constraints. Java worked its way into the mainstream, maybe Haskell or something else can do the same.
danieldk
07-26-2010, 01:58 PM
You can do anything with any language. C is small and concise. You can do just about anything with C.
That doesn't change my point that it is an absurd reduction. Since it ignores language semantics completely. Besides that, C is huge compared with Scheme ;).
Because of this and because an excellent cross platform implementation is freely available, many languages use it as their foundation.
Actually, it's one of the most unportable languages that is currently popular. First, there is virtually no standard library that is useful. POSIX expands the ANSI C library, however is not portable (e.g. Windows misses a lot of POSIX and UNIX library functions). Second, even basic datatypes are not predefined. What is the length of an int? Well, amongst others, it depends on a combination of platform, OS, and CPU. Third, endianness - you can't even rely on the order in data. This all leads to a situation where many C libraries have forests of ifdef preprocessor statements. Compare this to e.g. Java, where there is a big standard library, and data types are predictable. Most Java programs compile without any platform or operating system-specific code.
C++ and Java, the "industrial" languages, are bloated.
For C++ I agree. But how is this true for Java. I'd say that Java is exactly the opposite: compact, actually too compact. It doesn't provide stuff like closures/lambdas, operator overloading, multiple inheritance, mixins, templates, pattern matching, etc. It's a very simple object-oriented programming language with single inheritance, partly made for programmers who can not deal with bloat and complexity.
A programmer must spend a lot of time satisfying the compiler. I guess that is a good thing in an industrial environment.
Why?
The future of programming must address multi-core programming. Just about every new computer has multiple cores. That trend is the new upgrade. It used to be speed and memory. To utilize all of the cores, programming languages are going to have help mere mortals.
I write a lot of parallel code. Most of it is written by adding a few OpenMP pragma's to C++ code. There are a lot of tight loops that can be optimized easily. I am slightly sensitive to the arguments of functional programmers, immutability makes reasoning easier. But at this point, it's usually not worth the trade-off. You end up copying data all the time.
That is one of Go's core ;) goals.
Except that it does not bring anything new to the table. It does not promote immutability more than C++ or Java. Second, go-routines are far to heavyweight for typical parallelization of tight loops. Third, Go's everything is on the heap and garbage collected kills cache locality. Even when you parallelize stuff, your CPUs are probably waiting for data to be fetched from memory. C++ gives you very many possibilities for laying out data in memory, and that pays off.
[qoute]After looking at Haskell, I would have to agree, it is twenty years along in its development and may serve that purpose admirably. I downloaded the GHC Haskell Platform. I going to go through O'Reilly's online version of Haskell programming.[/quote]
The first few chapters of the Real World Haskell book are really great. Afterwards, things disintegrate a bit. But it is a good start. I also heard that 'Learn you a Haskell' is ok for newcomers.
I can do that since for me it is a hobby. Industrial programmers are frequently compelled to use a language due to legacy constraints. Java worked its way into the mainstream, maybe Haskell or something else can do the same.
Small chance. It's far to difficult for the typical 'business logic' programmer. Still, it's a lot of fun :). So, as a hobby, you can't find a better match.
Maybe we can set up a reading group? I am still looking for buddies to work through the chapters ;).
A reading group sounds like a very good idea.
I'll set it up.
Jeff
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.