Python/C++? Oh good lord.
Please tell me it doesn't have significant whitespace.
Google's back-end infrastructure is now running applications built with its new-age Go programming language. "We're already using Go internally at Google for some production stuff," Robert Pike, one of Go's developers and a former member of the Unix team at Bell Labs, said today during a question and answer session at the …
Please tell me it doesn't have significant whitespace.
...particularly in the way they've implemented inheritance and interfaces, its clean syntax, and the way the language is (still?) pretty uncluttered (yes, I like the idea of a garbage-collected, concurrent C). I sure hope that they come up with some sensible solution to exceptions and generics, though.
I'm not sure how you would like how they implemented inheritance, sice teh language has no inheritance...
to a language where they are still thinking about exceptions and error recovery. Are we really supposed to go backwards and return to checking subroutine return values for error indications for everything? It's a toy if when the battery runs down it turns into dust.
I can't think of any application for Go that would not be better served by either Python, C#, or C++. Requiring braces for block structure, and then TELLING YOU WHERE YOU HAVE TO PUT THEM, strikes me as crazy.
Either require them and let the user put them where he wants, or get rid of them and do it like Python. One or the other.
I mean both languages are, as far as I have seen, completely bloated with useless features. I think we can end the discussion by saying that both languages have operators _and_ functions.
Core Python is actually pretty small. There just aren't that many operators and reserved keywords.
Even if you extend that to include objects that live at the top level, w.o. a need for importing, like Dictionary, Sets and Lists, there just isn't that much stuff to keep track of.
The "magic" methods like __cmp__, __hash__, __str__, etc... do add some volume, but not all that much and you typically don't have to jump into them right away.
What there is a lot of are tons of libraries. Knowing which one to use, or just that something probably already does what you intend to code by hand, takes a while.
And the community can sometimes take way too long to settle on frameworks (Django vs. TurboGears vs. Zope vs. somebody's pet web server scriptlet is still dragging on unhelpfully).
Anyway, just compare a Python programmer's bookshelf with a Java programmer's ;-)
C++ on the other hand...
Paris, 'cuz she's not bloated with too much in the head either.
Google should do for languages what they've just done for video.
OK MS and Apple might not implement it for a while but once FF et all have implementations that make your browser run like a proper GUI*** they'd soon follow.
* this had most (if not all) the bits required for 'proper' programming
** business speak for cutting its head off and pooing down its neck so their own bastard proprietary stuff gets a look-in where it wouldnt otherwise.
*** its been possible for 15 years or so - but for proprietary implementations of web specs.
Take a "Dangerously typed" language and mash-it-up with a language that gets anal about whitespace and what do you get?
Call me old fashioned, but I'd rather have my compiler warning me about type incompatibility than waiting until someone else finds it at runtime.
It's not actually a very good language. The syntax looked like it grew rather than was designed. For example, there are about five different, incompatible, types of pointer. There's two, incompatible, ways of constructing objects. There's no support for generics. There's no support for exceptions. The type system doesn't support const correctness. Interfaces, while neat, are used inconsistently --- why are len() and cap() global functions occupying valuable namespace rather than methods on a Collection interface? And the syntax is a mangled mess, full of special-cases and obscure constructions formed by gluing expressions together.
There's some good stuff in Go --- I can forgive it a lot for having real closures, and its interface support is very intriguing --- but it's very telling that in the initial publicity video, the only killer feature they could think of is that it *compiles quickly*.
This makes me gnash my teeth in frustration, because if they'd read the literature before doing the design Go could have been so, so much more...
The justification for enforcing the One True Brace style is simply laughable.
Read the section on "Semicolons" for an illustration of the intellectual smugness of the whole excercise. The grammar includes semicolons, but -get this- "those semicolons do not appear in the source. Instead the lexer uses a simple rule to insert semicolons automatically as it scans". In other words, the actual language you type is not defined in the formal grammar.
The result is significant whitespace while still needing braces.
According to the "simple rule" described, this:
compiles OK, as a semicolon gets inserted after the )
Doesn't, as the "3" is a candidate for having a semicolon appended.
Probably, this doesn't happen, as the compiler is smarter. But, it's all non-intuitive, and thus error prone.
And all because somebody *really* doesn't like lined-up braces.
Dynamic types = a license to fail.
What a car crash of a programming language. I read the spec, and it looks like the kind of programming language a CompSci student might come up with for a course project.
I can't see any sophisticated scoping, so presumably everything is accessible within a package. There's no type inheritance, method overloading or generics, which is ridiculous. Exceptions are also a curious omission. "Slices" seem to be a pointless abstraction for a sub-list.
There are plenty of attempts at a "better" Java or C# out there, but this is not one of the ones with potential.
Every self respecting company in the IT world, should at least have one language, bigger companies should have more.
Microsoft went the way of VB, C#, F#..
So Google should also have at least 3. Let me make a suggestion:
Go, Went, Gone.
"for the most part, it's a new animal" says Rob Pike. They should have mentioned that the language is largely a translation of Wirth's Oberon to C-style syntax, and it is clear to anyone who knows the history of Pascal/Modula/Oberon.
In the 90s Pike have already borrowed heavily from Oberon when he designed Acme.
... of all your personal details.....
You "think we can end the discussion by saying that both languages have operators _and_ functions". So? Both are useful. Are you saying that C should only have a minus operator, because the plus is redundant when you have overflow?
Sure - because if it compiles it's correct
How to mix better the disadvantages of both languages? Significant whitespace PLUS mandatory brackets PLUS apparently, implicit semi-colons. Add a bit of Perl do-what-I-mean, and maybe, who knows, undefined behavior, in the good ol' C tradition.
Do they have compiler macros too!?
"There is a growing rebellion against cumbersome type systems like those of Java and C++, [...]"
Read: I can't be arsed with worrying about the details of my program and how it might operate (or mis-operate)...and I damn sure can't be arsed to have the program tell the poor sod who's going to have to maintain it 6 months from now what my intent was for all those typeless variables, and what they are supposed to hold.
Dread any language that some company designed to get the "best of both worlds", whatever those two worlds may be. It shall have the merits of neither and the vices of both. It shall have no sense of self-consistency, a syntax like the Winchester house, and a hideous, bloated set of incompatible features to satisfy the whims of every manager who wanted to bend the language to his demented sense of aesthetics. Many cooks shall spoil the broth.
It shall have none of the elegant, versatile simplicity of a language that was designed by someone with a clear sense of what the language should do; rather than be simple and flexible enough to adapt to what may be asked of it, it shall instead try to cover every possible eventuality with some horrid thing that was tacked on as an afterthought, and attempt to make up for a paucity of flexibility with sheer extent of sprawl.
It shall be like C++ and Java in every terrible way, and hapless programmers shall be forced to use it because the company shall decree it mission-critical--and thus it shall live at least as long as the company. Gentlemen, we may see here the genesis of a cthulhoid evil that may not die for generations to come.
Python is "good." C++ is abomination. Result: gobomination.
Computers have come a long way since Java's birth, but there don't seem to be that many new _mainstream_ languages.
C is a wonderful language for some jobs, but miserable for many others. Python, which I love, as well as Ruby are great for non-speed/memory critical jobs. Not so much for low-level stuff.
Java, C# and C++ impose many type-based limitations, without really making one as productive as Python can be. And that's after taking into account the "wonderful" effects of compile time checks on productivity. Java for one tries to pull a dynamic rabbit out of the XML hat, thus managing the worst of both worlds and obfuscating source code into xml docs.
Seems to me like we could use a more recent language that took into account a) our faster hardware b) multi-cores and the net-centricity of current problem spaces and, most importantly, c) the best features and practices of recent languages including the desirability or not of type management.
If Go works out, Google has enough weight to potentially make it very popular, rather than just a niche language. And they have very smart language designers, like Van Rossum and Thompson.
The worse that could happen is that they fail. So what? I for one wouldn't mind leapfrogging over ever having to use Java in anger.
Am I holding my breath? No.