Saturday, April 3, 2010

Go Go Gadget-Concurrency

Premature optimization may be the root of all evil, but timely optimization is often required. When optimization becomes necessary, coding in Groovy can make refactoring in Java painless. However, Java is a less than ideal "systems programming" language for a number reasons, the least not being that it wasn't designed to be such. Yet if you've ever spent significant time using a dynamically typed language such as Groovy or even a statically typed yet garbaged collected like Java, you'll find having to go back to C, or C++ to be onerous to say the least. .

Enter Go. Taken from the Go Language Design FAQ:
"Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. "

This sounds almost too good to be true, mainly because it's been a long time coming. There hasn't been much inovation- at least that which has received popular traction- in the systems programming space since C/C++. Indeed, Go looks much like C itself with some of the syntax reversed. Digging a little deeper there are number of features that a programmer used to dynamic typing would consider must have. Namely maps, foreach-like loops and minimizing the type declcaration necessary for variable instantiation.

At the same time, Go offers some impressive concurrency features: light-weight 'threads' or goroutines, segmented stacks and channels as first class objects. Go multiplexes independently executing functions. When a function blocks, such as by calling a blocking system call, the run-time automatically moves other coroutines on the same operating system thread to a different, runnable thread so they won't be blocked. Combined these features make high performance concurrent applications conceptually simple.

If you haven't already, take a look at Go.

Labels:

6 Comments:

At December 18, 2011 at 10:24 PM , Blogger MLB2k11 said...

Thanks for the post. It was very interesting and meaningful.
Vee Eee Technologies

 
At March 19, 2019 at 12:47 AM , Blogger Sanjib Das said...

This comment has been removed by the author.

 
At August 25, 2019 at 8:23 AM , Blogger TuitionWale said...

Nice blog, it's so knowledgeable, informative, and good looking site. I appreciate your hard work. Good job. Thank you for this wonderful sharing with us. Keep Sharing.
सबी क्रेडिट कार्ड कस्टमर केयर | सबी क्रेडिट कार्ड कस्टमर केयर नंबर

 
At September 14, 2019 at 4:59 AM , Blogger Mahiswitha said...

Thanks for sharing this amazing blog .Nice,Keep going

Spa in Vizag
Best Salon in Vizag
Best Beauty parlours in vizag

 
At January 17, 2021 at 12:37 AM , Blogger Karthik MyResearch said...

3333it Free Advertising Site Is Available In Many Countries. Sell ​​Things You Don’T Need For A Long Time
https://friendsatozadvertisingpvtltd.blogspot.com/

 
At July 4, 2021 at 3:45 AM , Blogger Karthik MyResearch said...

ID 474747 Our SafeTaTaweb Low Cost Website Design can deliver a business Client ID 474747 or personal application website design without any flaws in all the features you expect.
https://123just.com/pro/safetataweb

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home