Google's Go Finally Kills Off C
Written by Mike James   
Thursday, 20 August 2015

Don't panic - Go has eliminated C only in the sense that it no longer makes use of C within its own code. Yes, with its latest release, the Google alternative to the C language finally frees itself from C. 

 

Go

 

Go 1.5 is self hosting in the sense that the entire toolchain - compiler etc - is now written in Go. While Go is designed to be an alternative to C as a better low level systems language, you have to start somewhere and the simplest option is to write your early compilers in an existing language and C is a good choice. However, once you have a compiler you can start to convert the code to the language you are implementing and eventually end up with a compiler that is in the new language. Feed this through your existing compiler and you can throw it and its source code away and have a Go compiler written in nothing but Go. 

The advantage of this is that now you have tools that are written in the Go language and hence can be modified by Go programmers. What is more, it makes a great testbed - we now know that Go is enough of a language to write a compiler and all the extra code. 

Other improvements in Version 1.5 are mainly to the implementation of the language. 

The garbage collector has been completely redesigned with the result that pauses in execution due to a garbage collection run have been reduced. 

Given Go's good multithreading facilities it has always been a mystery why the number of maximum concurrent goroutines was set to one. Now the scheduler has been written and it is now possible to set the default maximum to the number of available CPUs .

Of course you need to keep in mind that the language Go is most often thought of as replacing didn't have threads or the need for garbage collection out of the box. If you want these features in C you have to treat them as add-ons. 

Improvements to the tools include:

"Support for "internal" packages permits sharing implementation details between packages. Experimental support for "vendoring" external dependencies is a step toward a standard mechanism for managing dependencies in Go programs. The new "go tool trace" command enables the visualisation of  program traces generated by new tracing infrastructure in the runtime. The new "go doc" command is a substitute for the original "godoc" that provides an improved command-line interface."

Also improved is the range of OS and architectures supported. We now have darwin/arm, darwin/arm64 and linux/arm54. There is also experimental support for PowerPC even though it must be a minority interest. The new OS/platform support help with the Go mobile project to investigate if Go could be useful as a language for Android and iOS development. 

There are a number of improvements to the standard library including a new arbitrary precision floating point type.  

Go is beginning to look mature, but there are still complaints that it lacks features - generics being top of the list. Go also needs a sophisticated and standard IDE to make it more attractive to the casual user. Others argue that the language is simple and doesn't need bloat such as operator overloading. 

Only time will tell which camp is right. 

goicon1

Banner


TypeScript 5.4 Adds NoInfer Type
12/03/2024

TypeScript 5.4 has been released, with the addition of a NoInfer utility type alongside preserved narrowing in closures following last assignments. 



Angular and Wiz To Merge
27/03/2024

Two web development frameworks used at Google are merging. One, Angular is open source and widely known, while the other, Wiz, is an internal web framework developed and used by Google for some o [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 20 August 2015 )