Linked by Thom Holwerda on Tue 4th Sep 2012 20:04 UTC, submitted by MOS6510
General Development "Computer programming is the art, craft and science of writing programs which define how computers operate. This book will teach you how to write computer programs using a programming language designed by Google named Go." Freely available book on Go.
Order by: Score:
Comment by shmerl
by shmerl on Tue 4th Sep 2012 20:17 UTC
shmerl
Member since:
2010-06-08

Nice. Now someone should make an introductory book for programming in Rust (http://rust-lang.org)

Reply Score: 1

HangLoose
Member since:
2007-09-03

***I know this comment is controversial and I am not trying to flame bait or make start a war but I am really interested to know what are the opinions. So before down voting this comment leave your reply.***

As much as I would like to see (use?) new languages on my everyday work, will we see anything of this new crop of languages actually make any dent in the market? Companies that started with PHP or Rails started moving away from that

Heard a lot about Go and Scala, also Groovy and Rails. But somehow the hype around those faded away and we are back to the old axis of languages.

What is the opinion of everyone around here? What about the merits of individual languages and why they dont stick?

thanks in advance

Reply Score: 6

shmerl Member since:
2010-06-08

There aren't so many efforts to make a compiled language improving on the failures of C++. Namely these are Rust and Go. All others you mentioned aren't compiled. So why not.

Edited 2012-09-04 20:55 UTC

Reply Score: 2

butters Member since:
2005-07-08

D falls into that category but hasn't had much traction, it would seem.

Reply Score: 4

YEPHENAS Member since:
2008-07-14

I think D repeats the mistakes of C++ with its kitchen sink approach.

Reply Score: 2

jgfenix Member since:
2006-05-25

What do you mean? I think D2 is very interesting and solves the majority of C++´s problems.

Reply Score: 1

Neolander Member since:
2010-03-08

Well, one of the main particularities of C++ is that it tries to integrate every programming language feature known to man in a huge bundle. As stated multiple times by Stourstrup on his website, this was done on purpose, so as not to enforce a particular coding standard upon developer. However, it causes several problems :

-Teaching students about the whole language within a reasonable time frame is impossible. Even if it was possible, they would not remember it all anyway. Therefore, every C++ dev uses a unique subset of the languages' features, and may not be familiar with the subset of other devs even with years of coding experience behind him.

-Compilers have a hard time keeping up with the flow of new features. This is especially apparent today with C++11, since features whose inclusion in the standard was decided almost a decade ago are still not properly supported by most commercial compilers.

-Design effort is spread between all the features, thus there is little manpower available to polish individual features. Rough edges are frequent because of this, and fixed slowly if ever (think about all the intricacies of operator overloading, or how long it took for the language to gain fixed-size integer types).

-Library compatibility with other languages is minimal unless people use a very small subset of the available features in them (essentially coding all interface code in C)


D seems to follow the same path as C++ on this front. It individually adresses every gripe that people have with C++, but does not even attempt to do so in a clean and small package. Thus, if D got the popularity of C++, it would likely suffer as much issues in the long run. The fact that the language has already went through a first incompatible revision of the spec in its short existence is especially telling on this front.

Reply Score: 3

moondevil Member since:
2005-07-08

This complaint can also be addressed to Ada, Modula-3, Delphi, C#, Scala, Lisp, Haskell, ML...

Programming is a complex subject and invariably all languages that start as a movement against complex languages, end up getting complex as people realize that the features the designers left out actually exist for a reason.

The way Go throws out the window two decades of language research made me change from a initial contributor to the language, to a D/Rust fan.

Reply Score: 2

renox Member since:
2005-07-06

This complaint can also be addressed to Ada, Modula-3, Delphi, C#, Scala, Lisp, Haskell, ML...


Lisp? Seriously?

What matters is the seriousness of this complaint: it is not black or white.. C++ is a monster, D is a bit better but it still is *very* complex..

Reply Score: 2

Neolander Member since:
2010-03-08

This complaint can also be addressed to Ada, Modula-3, Delphi, C#, Scala, Lisp, Haskell, ML...

Considering that most of these have either fallen into disuse or been restricted to a niche these days, I am not sure how this large list is supposed to impress me.

Programming is a complex subject and invariably all languages that start as a movement against complex languages, end up getting complex as people realize that the features the designers left out actually exist for a reason.

Please correct me if I'm wrong, but you give me the impression that in your view, programming languages are mostly interchangeable, to the point their features might easily be enumerated in a standard way and compared using giant tables without further information.

It seems to me that to the contrary, if you want to get the most out of a programming language, you need to stop blindly looking for familiar features from other languages which you already know, and instead learn through tutorials the idiomatic constructs that achieve the same goal in your new language. Here are some examples :

-In C/++, arrays and pointers are closely related. To parse an array, most C devs take a pointer to the first element and increment it on every loop iteration with the ++ operator. Many other programming languages, on the other hand, won't have such a basic array implementation because it is a recipe for buffer overflow. Are they worse because they ask you to use either range-based fors or counter variables and square brackets ?

-In C/++, parsing an array is typically done using for loops, complete with some iterator magic if you're using C++'s containers. In MATLAB, interpreter performance is not a priority for devs so for loops are horribly slow, however you have efficient built-ins for matrix manipulation and the idiomatic way to do most repetitive mathematic operations on some set of data is to express them as a matrix operation. Would you use for loops anyways ?

-In C++, if you want a bunch of objects that share some common methods, say Save() and Load(), you make yourself some gigantic class hierarchy and put near the bottom of it some basic class that has Save() and Load() as pure virtual methods. In Go, you create an interface that has methods Save() and Load(), and use it as a generic way to designate any object that has these methods. Is the latter way of doing things somehow worse than the former, in spite of requiring much less design work ?


If you follow this reasoning, you will find that it does not really matter if a given programming language has a specific feature X or Y. Feature parity is useful for beginners, because it means that they can reuse their knowledge from another language right away, but from the point of view of expert users, the only thing that matters is that the language should offer a way to achieve the same results with comparable efficiency. Only the end matters, not the means used to reach it.

The way Go throws out the window two decades of language research made me change from a initial contributor to the language, to a D/Rust fan.

How exactly does Go fail to take into account all these years of language research ? In which way is it more comparable to languages from 20 years ago than more modern languages ?

Reply Score: 2

SlothNinja Member since:
2011-03-22

I guess it depends on your definition of traction.

For me, I'm using Go on Google App Engine (GAE) for my hobby site that hosts a couple board games. (See, www.slothninja.com). I'm really happy with the performance and the language. Given Go is compiled, it seems to be much more resource friendly than the other two GAE languages, Java and Python. Also, Go's compilation is so quick it truly feels like programming in a scripting language with the added advantage of type checking.

Is Go perfect? No. It definitely took me some time to get used to it's object model and how to write reusable code. But, once you start to grok Composition and Interfaces, it really becomes a pleasure to use.

With that said, only time will tell if it gains any traction. But, as along is Google keeps supporting it on GAE, it will meet my needs. Also, I believe a Go front-end is now formally part of GCC so it is unlikely it will disappear soon even if Google drops it.

Reply Score: 5

s-peter Member since:
2006-01-29

http://go-lang.cat-v.org/organizations-using-go

I'd say for a relatively new language, Go already has quite a bit of traction. But then I'm a Go fanatic so I may be biased.

Reply Score: 4

MOS6510 Member since:
2011-05-12

I think old languages are much more complete, they are established, lots of people have experience and have published lots of examples, tutorials and books.

New languages have more bugs, are less complete and have less Google search hits. They may have some advantage over older languages, but lack in other areas. To improve these things you need a lot of users, but it's hard to get those if they'll quickly fall back on the languages they already master.

Reply Score: 2

flypig Member since:
2005-07-13

I'm no expert on this, but my understanding is that all of these languages tend to have some particularly attractive feature that's often not found in other similar languages.

For example, Go offers an element of static (compile-time) duck typing, which is unusual. The only other language I'm aware of that achieves this is StaDyn: http://www.reflection.uniovi.es/stadyn/ This is great for combining the speed and robustness of static typing while making programming easier.

I don't know Go, so I'm sure there are other good reasons to use it (e.g. very fast compile time). No doubt there are similar arguments for the other languages you mention.

The fact is though, there's strong resistance to using new languages simply because existing languages have built up broad collections of tools and libraries (and jobs!).

That doesn't mean these new languages aren't important though. The benefits of newcomer languages eventually seep in to other languages. Occasionally a new languages capturing a sensible collection of benefits disrupts the community and sticks. This happened with Java and .Net (I'm guessing partly because their creators invested heavily in developing extensive tool and library support from release).

This is all just my opinion of course, since you did ask for opinions!

Reply Score: 5

butters Member since:
2005-07-08

I would say that JavaScript has made a dent in the market. Yeah, it started as a language that people used because it's the only language runtime supported by web browsers. Yeah, it has an peculiar object model. Yeah, the syntax can be annoying });

But the runtime engines are really fast, and it's not so bad as a meta-language upon which better languages can be built using frameworks and pre-compilers.

Yeah, JavaScript is inferior to Lua in every possible way, but it's caught on, and it's here to stay.

Reply Score: 3

Neolander Member since:
2010-03-08

Well, I've enjoyed a lot the "tour of Go" which I've taken in July, so here's my impression.

As for the merits of the language, I can sum it up by the fact that it manages to be conceptually simple (look at how short and clear the spec is !) and powerful at the same time. The other languages with a small feature set which I know of, which are C, ASM and BF (yeah...), tend to make everyday coding tedious as a side-effect. Go manages to have a well-picked feature set that is expressive and restrained at the same time, and I have to applaud Rob Pike and his coworkers for that achievement.

Now, as for why these new language won't stick, I think that C and C++ have simply been around for too long. They have this huge amount of libraries written for them, these extremely optimized compilers, this huge amount of developers who know them and teach them.

Perhaps what a new programming language needs in order to gain acceptance after such a period of stagnation is the support of a well-received new OS or platform. After all, one can well argue that C wouldn't be where it is without UNIX; that HTML, Javascript, PHP, Java and Flash wouldn't be where they are if the Web hadn't grown this way; that C# would have never achieved significant developer acceptance without the support of Microsoft...

The only popular languages whose success I can't explain this way are C++ and Python. As far as I can tell, these became successful first and only then received the support of OSs. Perhaps they are the only languages that have gained developer acceptance by the sole virtue of their intrinsic merits, or perhaps I am just missing something...

Edited 2012-09-04 22:35 UTC

Reply Score: 6

satsujinka Member since:
2010-03-11

Python seems to have gained popularity via back door. People didn't like perl so they switched to Python. Then you got mass... followed by adoption (also I believe the source engine uses python for scripting.)

C++ probably got popular because of C (in that it's a super set of C, meaning you can just go ahead and add your stuff to old C code.)

Edited 2012-09-04 22:35 UTC

Reply Score: 3

shmerl Member since:
2010-06-08

I think Ruby syntax is neater, but Python is more widely used, even with the strange idea of using whitespace as scope delimiting.

Edited 2012-09-04 23:03 UTC

Reply Score: 2

ricegf Member since:
2007-04-25

I thought so, too, until I started using it. Now I'm annoyed by the squiggly braces in those other languages. :-D

Ruby's loop syntax struck me as strange - but that's a personal issue. I was probably brain-damaged by years of FORTRAN until better languages came along...

Reply Score: 3

moondevil Member since:
2005-07-08

Some of the reasons for C++ success were:

- C++ was also developed at AT&T, like C and UNIX;
- stronger type checking than C, while allowing to use most of the C code;
- when it appeared it was the only language able to offer OOP constructs at an affordable execution speed on the available hardware.
- most C compiler vendors started offering C++ compilers with toolkits for UI programming (TurboVision, OWL, MFC)
- CORBA appeared in the enterprise
- Some game studios decided to invest on it.

Reply Score: 5

Luminair Member since:
2007-03-30

how much traction do you want? if a bunch of companies are using it, isn't that enough?

low traction doesn't mean it's not good, it just means it isn't good enough to warrant dumping all your code and all your coders brains and starting over. that is a high bar

Reply Score: 2

YEPHENAS Member since:
2008-07-14

I do not see these languages/frameworks used less. And after a hype comes the plateau of productivity.

Reply Score: 2

Valhalla Member since:
2006-01-24

What about the merits of individual languages and why they dont stick?

Well looking at Go (which is what this article was about) it's far too early to evaluate if it will 'stick' or not, but in my opinion it's off to a good start.

My main languages are Python and C, and I think Go lands somewhere in-between with some nice built-in concurrency features.

I've only played around with it sofar, here's a small rundown of likes / dislikes:

likes:
fast compilation (as in fast!), simple clean build system
clean language syntax
interfaces!!
goroutines, channels
multiple return values, duck-typing, defer, composite literals
data initialized to zero

dislikes:
at times rather poor performance for a static 'aiming at c-like speed' language, however it's still very young. Gccgo gives greatly improved performance in some programs.

lack of a union type, started calling some c libraries using cgo only to notice that accessing union data required awkward and slow runtime reflection.

no implicit type conversion (death of a thousand casts)

non-optional garbage collection (however given Go's target domain of concurrent programming I can understand the rationale behind this choice)

Anyway, as I said I've only played around with it briefly sofar but I'm thinking of diving into it seriously, anyone have a beyond-the-barebones Go programming book to recommend?

Reply Score: 3

satsujinka Member since:
2010-03-11

I mostly agree, however, I don't really feel it's performance is so poor as to be an issue. I do really miss the union type, however, if I remember correctly there was issues with the gc (and interfaces can cover in language needs to a certain extent.)

Reply Score: 1

Valhalla Member since:
2006-01-24

I mostly agree, however, I don't really feel it's performance is so poor as to be an issue.

Well it was mainly that of me expecting near c-performance as that was a stated goal, however I also think the lack of (my expected) performance is primarily due to the lack of a mature gc and better optimized math functionality. Maybe I should do a tip build to see if there's been any substantial improvements of late.

I do really miss the union type, however, if I remember correctly there was issues with the gc (and interfaces can cover in language needs to a certain extent.)

Yes I can see it potentially causing problems for a memory safe language like Go, still it's really only a problem if you are using external code like c-libraries, if you code 100% in Go I presume you can efficiently design around a need for it.

Reply Score: 2

sgtrock Member since:
2011-05-13

One obvious place to look is job postings. For example, take a look at this http://www.indeed.com/jobtrends?q=php%2Cpython%2Cjavascript... from Indeed.Com showing relative job growth (and loss) for PHP, Python, Javascript, Java, and .NET. http://www.indeed.com/jobtrends?q=php%2Cpython%2Cjavascript... just make the job growth curve for dynamic languages even more obvious.

Note: Sorry for the site not honoring the closing tags.
Even if you look at those graphs from an absolute perspective instead of a relative one, it becomes pretty obvious that there's a very healthy demand for programmers who understand when to use dynamic languages.

Reply Score: 2

Go seems alright...
by Tuishimi on Tue 4th Sep 2012 22:08 UTC
Tuishimi
Member since:
2005-07-06

...I haven't looked at it since it was first released. It wasn't easy to use on Windows at the time.

I don't understand why Ada never took off, it had everything you find in the modern languages: tasks, low-level bit manipulation, OS assembly language interface, packages, OOP-like, even its own build dependency system. And I just like it.

Edited 2012-09-04 22:11 UTC

Reply Score: 2

RE: Go seems alright...
by Hypnos on Wed 5th Sep 2012 01:41 UTC in reply to "Go seems alright..."
Hypnos Member since:
2008-11-19

Maybe it has too many features, giving the impression of a closed, specialist ecosystem.

Tools with smaller scope (e.g. C) are easier to wrap your head around and place in the context of your other tools (e.g., make).

Reply Score: 3

RE: Go seems alright...
by kwan_e on Wed 5th Sep 2012 02:43 UTC in reply to "Go seems alright..."
kwan_e Member since:
2007-02-18

...I haven't looked at it since it was first released. It wasn't easy to use on Windows at the time.

I don't understand why Ada never took off, it had everything you find in the modern languages: tasks, low-level bit manipulation, OS assembly language interface, packages, OOP-like, even its own build dependency system. And I just like it.


I bought the book for Ada 2005, and being the C++ fanboy I am, I seriously wish C++ adopted a whole bunch of Ada features. It seemed really strange with C++11 that there was all the hype about concepts that were ditched due to difficulty when Ada has a much more clean way to specify template requirements. Was it seriously that hard for the standards committee to look outside of C-like languages?

The only thing that still puts me off Ada is it's OO implementation. I still can't get my head around the rules of elaboration or the rules for getting the [type].[method] syntax to work.

Reply Score: 2

RE: Go seems alright...
by ricegf on Wed 5th Sep 2012 12:41 UTC in reply to "Go seems alright..."
ricegf Member since:
2007-04-25

I loved Ada, but it had the stigma of being government mandated. Worse, when PC Ada compilers were first introduced, the government wouldn't let them use the name "Ada" because they weren't certified to the spec (because DOS was... well, DOS).

Kiss of death.

My favorite Ada anecdote was the government commission to determine what was needed to make Ada a commercial success. Their recommendation to congress was to EITHER (1) invest $15 million in establishing an Ada promotions board, OR (2) invest nothing, because less that $15 million would fail.

Congress, inevitably, voted $10 million.

And that, boys and girls, explains it all. :-D

Reply Score: 6

RE: Go seems alright...
by renox on Wed 5th Sep 2012 14:28 UTC in reply to "Go seems alright..."
renox Member since:
2005-07-06

I don't understand why Ada never took off


1) At the beginning it wasn't very "object oriented" when the fashion for object-orientation was very strong

2) The tools were quite expensive. The DOD should have funded GNAT, much, much earlier.

Reply Score: 2

RE[2]: Go seems alright...
by Tuishimi on Wed 5th Sep 2012 14:53 UTC in reply to "RE: Go seems alright..."
Tuishimi Member since:
2005-07-06

re: cost... true. I had "free access" to an excellent compiler and even had the pleasure and privilege of working on a VMS component written in Ada. I know the first iteration of Ada was not fully OOP (oop-like) but you could fudge it. Ahhh... I think I still have my Booch book lying around somewhere. ;)

Reply Score: 2

...
by Hiev on Tue 4th Sep 2012 22:47 UTC
Hiev
Member since:
2005-09-27

The need of new languages is due to modern technologies and patterns, 20 years ago the internet it wasn't the boom it is today, and there are two paths to take, modernize a 30 years old language or create a new one that takes in count all the new technologies.

Go is a modern language that do this, it is designed for fast compilation and it is web aware, I believe it has a future.

Edited 2012-09-04 22:47 UTC

Reply Score: 2

Please combine it with....
by fithisux on Wed 5th Sep 2012 08:49 UTC
fithisux
Member since:
2006-01-22

Network programming in Go http://jan.newmarch.name/go/

and the google tour.

Reply Score: 3

Ugh
by peteo on Wed 5th Sep 2012 09:42 UTC
peteo
Member since:
2011-10-05

A language where source input formatting and indentifier casing affects the semantics is just pukeware. Like Python.

Edited 2012-09-05 09:44 UTC

Reply Score: 1

RE: Ugh
by Sodki on Wed 5th Sep 2012 11:42 UTC in reply to "Ugh"
Sodki Member since:
2005-11-10

A language where source input formatting and indentifier casing affects the semantics is just pukeware. Like Python.


Why?

Reply Score: 2

RE: Ugh
by Lobotomik on Wed 5th Sep 2012 11:48 UTC in reply to "Ugh"
Lobotomik Member since:
2006-01-03

Well, it looks like quite a large community of Python programmers totally disagree. But you must know better...

Reply Score: 4

RE[2]: Ugh
by Slambert666 on Wed 5th Sep 2012 14:00 UTC in reply to "RE: Ugh"
Slambert666 Member since:
2008-10-30

Well, it looks like quite a large community of Python programmers totally disagree. But you must know better...


Well, did you know that the most, by far, requested change to the python language is to allow it to use curlybraces instead of indentation.

Python3 also tries to fix some of the puke in Python2 so now there are two incompatible versions of Python.

Reply Score: 1

Cite?
by sgtrock on Wed 5th Sep 2012 18:33 UTC in reply to "RE[2]: Ugh"
sgtrock Member since:
2011-05-13

Show me the bug report. Show me the continual discussions by all and sundry involved in development and use of Python. It doesn't exist.

The truth is, people who program in Python quickly learn the same lesson http://www.linuxjournal.com/article/3882>

<blockquote> Of course, this brought me face to face once again with Python's pons asinorum, the significance of whitespace. This time, however, I charged ahead and roughed out some code for a handful of sample GUI elements. Oddly enough, Python's use of whitespace stopped feeling unnatural after about twenty minutes. I just indented code, pretty much as I would have done in a C program anyway, and it worked.

That was my first surprise. My second came a couple of hours into the project, when I noticed (allowing for pauses needed to look up new features in Programming Python) I was generating working code nearly as fast as I could type. When I realized this, I was quite startled. An important measure of effort in coding is the frequency with which you write something that doesn't actually match your mental representation of the problem, and have to backtrack on realizing that what you just typed won't actually tell the language to do what you're thinking. An important measure of good language design is how rapidly the percentage of missteps of this kind falls as you gain experience with the language.

When you're writing working code nearly as fast as you can type and your misstep rate is near zero, it generally means you've achieved mastery of the language. But that didn't make sense, because it was still day one and I was regularly pausing to look up new language and library features! </blockquote>

IOW, it's not the whitespace that's the issue, it's your refusal to recognize that you're indenting anyway. You're giving up on a language long before you give it a chance for the wrong reason. :-)

Reply Score: 3

RE: Ugh
by butters on Wed 5th Sep 2012 15:21 UTC in reply to "Ugh"
butters Member since:
2005-07-08

A couple years ago I contracted for an architectural engineering firm, and it stuck me that software is a shockingly undisciplined field compared to other engineering professions. Their work is based on industry-standard conventions. A design drawing or an equipment schedule always follows the same style and structure regardless of which firm produced it. In most other engineering fields, firms are legally and financially liable for design defects.

Maybe software isn't ready for industry-wide standards. But is it too much to ask that code is consistent in style and structure across its language, that all Python code or all Go code looks the same no matter who wrote it? Our industry has to grow up. The modern world depends on software, and we're simply not meeting expectations.

Reply Score: 3

RE[2]: Ugh
by moondevil on Wed 5th Sep 2012 18:56 UTC in reply to "RE: Ugh"
moondevil Member since:
2005-07-08

The problem is that the industry is still full of prima-donnas that think they are better than to follow standards.

Plus while other engineering areas have mostly people with university degrees, in computing it is still possible in some countries to get in the industry without formal education.

Reply Score: 3