Linked by fran on Fri 22nd Jul 2011 21:02 UTC
Google "Now everyone can use Google's Go language on the company's App Engine cloud platform as the company has announced that the Go runtime, which has been in development since it was announced at Google I/O, is now generally available."
Thread beginning with comment 482201
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[4]: Oracle lawsuit
by JonathanBThompson on Tue 26th Jul 2011 00:29 UTC in reply to "RE[3]: Oracle lawsuit"
JonathanBThompson
Member since:
2006-05-26

C++ and dependency nightmares? Please elaborate on your statement there.

Where there's sloppy design, there's dependency nightmares: where there's proper design, there is not. This is not specific to C/Objective-C/C++, as all languages that allow forward declarations/references (and languages that don't are rare) allow for circular dependencies, which is when things balloon out of control and become dependency nightmares.

What do a lot of more recent languages have that C/C++ doesn't provide built-in? The import statement (or equivalent) where you don't have to go out of your way to define something to say it has already been included. That's all. Note, however, you can still ensure things aren't included more than once in the same compilation unit, with proper usage of the preprocessor.

Reply Parent Score: 2

RE[5]: Oracle lawsuit
by galvanash on Tue 26th Jul 2011 01:49 in reply to "RE[4]: Oracle lawsuit"
galvanash Member since:
2006-01-25

C++ and dependency nightmares? Please elaborate on your statement there.


Go does not use header files at all, and unit/package scope is controlled through simple syntactic rules (anything starting with an upper case letter is externally visible, otherwise it is private).

Where there's sloppy design, there's dependency nightmares: where there's proper design, there is not. This is not specific to C/Objective-C/C++, as all languages that allow forward declarations/references (and languages that don't are rare) allow for circular dependencies, which is when things balloon out of control and become dependency nightmares.


Hence why Go does not allow forward declarations (I guess it is one of those rare ones you speak of). You define things once and only once - there is never any need (or even support) to do otherwise. Since there is no type hierarchy the need for forward declarations doesn't exist.

What do a lot of more recent languages have that C/C++ doesn't provide built-in? The import statement (or equivalent) where you don't have to go out of your way to define something to say it has already been included. That's all. Note, however, you can still ensure things aren't included more than once in the same compilation unit, with proper usage of the preprocessor.


I don't do much C++ development (I very briefly dabbled in it a few years ago) - my understanding of the nuts and bolts of compilation and dependency resolution are very limited.

I can say though, that in trying to write a reply to you here I did do some reading up on how whole header/preprocessor/etc. combination works in C++. Suffice to say that after reading for about an hour I still don't understand it. The "rules" in Go can be explained, pretty much in their entirety without omitting anything important, in a single sentence. Quite a contrast to me, just saying...

Reply Parent Score: 2

RE[6]: Oracle lawsuit
by JonathanBThompson on Wed 27th Jul 2011 02:07 in reply to "RE[5]: Oracle lawsuit"
JonathanBThompson Member since:
2006-05-26

Thanks for explaining that. However, what Google has done just saves typing, but doesn't do anything related to preventing a bad structure, except hide it ;) I can see how they do it (read through all the code on a first pass to find all identifiers) and why they do it (to reduce typing, because anything you possibly do more than once exposes human error into the equation needlessly) but it doesn't change anything related to dependencies. (shrug)

Reply Parent Score: 2