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.
Thread beginning with comment 534037
To view parent comment, click here.
To read all comments associated with this story, please click here.
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 Parent 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 Parent 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 Parent 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 Parent Score: 2