The Go Programming Language
Вставка
- Опубліковано 26 чер 2024
- Google Tech Talks
October 30, 2009
ABSTRACT
Presented by Rob Pike
What is Go?
Go is a new experimental systems programming language intended to make software development fast. Our goal is that a major Google binary should be buildable in a few seconds on a single machine. The language is concurrent, garbage-collected, and requires explicit declaration of dependencies. Simple syntax and a clean type system support a number of programming styles.
For more on Go including FAQs, source code, libraries, and tutorials, please see:
golang.org - Наука та технологія
It lived up to the hype, still exciting even 12 years later
Reading through the comments: "no one's gonna use it", "it's crap"
There shouldn't be any relevant programs writt... Is that fricking Docker?
I like it.
It fills a gap that I thing would be good. For doing a simple web app, C is too low level, C# too much overhead in terms of building it and mono. But this would give me the safety, and the fast compilation.
I think its kind of an old-school new language. I like it!
true
Watching this after almost 11 years. Reading the comments posted 8-10 years ago is fun!
The interface concept is beautiful. Passing of objects under various unassuming contexts without multiple inheritance (evil) or templates (rabbit hole)
= Kickass.
I know this sounds premature at the moment (I haven't tried Go yet), but, if all Go's claims are true, then Go really rocks. Looks like a C++ and Python/Lisp hybrid to me! Great job Google!
It's great to have something new doing things a bit different. It's great to see if running on a mac too!!!!
It looks like this is pretty good choice for server development. It has many of the features that I liked in Python, and gives the extra bit of control that you don't get from Python.
It doesn't just "count to 100,000", it starts 100,000 threads (or at least things that feel like threads from the outside) simultaneously, and lets each of them read a value from an input stream, add 1, and write the result to an output stream (where the next thread picks it up). If you tried to do that in Java or C# or another language that has explicit low-level thread support, you'd probably blow up the machine.
last reply from me, ..quoted from D compiler front-end license (in the download in case you didn't know ;) )
"Compiler Front End Source - These sources are free, they are redistributable and modifiable
under the terms of the GNU General Public License (attached as gpl.txt),
or the Artistic License (attached as artistic.txt).
It does not apply to anything else distributed by Digital Mars,
including D compiler executables.
-Walter Bright"
read the last sentence.
Very true. Let's give it a real shot before passing any judgments. You never know!
the channels are really good !
i'm going to trying
For the what you give up in execution time for what you gain... concurrency and garbage collection as well as a lighting fast compilation, it's a really good trade off. Yes, i know C is really fast, but you have to understand that efficiency between languages has to do with a lot of variables. Like, which parts of each language are more efficient than the other. I think that I will adopt Go programming as soon as it comes out. until then, i'm a C/++ programmer. (i'll probably learn python too.
A person who thinks Pascal deserves to be laughed at. A person who forces others to think Pascal deserves to die.
Your attempt to argument with names instead of objective reasons only proves the point.
Did you out these with the gccgo compiler as well?
Which was told to be more thorough, but as a penalty way slower than the speedy (6c?) one.
You can use an input framework to convert the alphabetical input to another language.
Statically typed language with the easy of dynamically typed languages = type inference. This has been done since the 70's with the ML family of languages.
amazing, google never stops
These are Plan 9 conventions. In Plan 9 the C compiler is $c where $ is the platform identifier such as 8 for 386 or 6 for x86-64.
@KrakensDen
I know. I think that what I should have wrote is "as soon as it becomes significantly prevalent"
many languages are created, but few make the cut. have you ever heard of x++? hardly any use it, but it's out there. I just want to see that a lot of people adopt it.
@JoseThePhd actually it's worked very well, the difference being that Google's objectives are wide and varied in the technology market. Look at the massive support behind their APIs.
very interesting. will give it a try!
This is exciting!
i agree with you...i ll continue to use Erlang...until (and if) GO becomes a production ready environment.
"Some C++ implementations automatically recycle the storage occupied by unreachable objects (garbage collecting implementation) ... Even when a garbage collector is running, delete will invoke a destructor if one is defined, so it is still a serious error to delete an object twice." -- The C++ Programming Language, 3rd Edition, Bjarne Stroustrup, Addison Wesley Books
@WCverfrisser
Slow is so relative. If a language causes you to use better design then your program may very well be faster.
There are some errors in the subtitles.
15:26 "when you get into this dependency trees"
16:17 "for you and utterly transparent"
15:48 "words like thread or process or coroutine,"
good video, thanks for language
that was my thought too.. Is go the 'systems language' of a new multicore friendly OS with Erlang the application language?
just to clarify DMD is open source, the front end is GPL.
LDC 64bit linux is working fine, less problems than DMD32.
As Ken said on one of the last slides, you must excpect 10 to 20% slower that plain C.
But think of all you get for this little extra overhead...
@Zasket2 There's an issue but it's no problem for Google. McCabe doesn't have a registered copyright on Go!
Yeah, let's have an opinion about a language we've never written a working program in, that'll be so informed!
I don't understand one thing: what does 6c do? It's called "c compiler" - is the go-code translated to c and then compiled? Probably not, so what is it for? Also, is it possible (theoretically) to make a go-compiler for microcontrollers, like the AVR? Would it make sense?
This looks like a very interesting language, although the syntax does seem pretty ugly, but I guess build-times make up for that.
Please keep your word and consider my advice.
Most programmers don't realize how much energy has gone into trying to make python run faster. Many projects exist for the sole purpose of solving this problem and all of the ones I have seen (Pypy, Psyco, Pyrex) provide their own dialect of python (example: Pypy uses RPython -- aka "Restricted Python").
Go appears to be approaching this problem from the other side by starting with C++ and making it more python-esc. As a big fan of both python and C++, I can't wait to see what it is capable of.
You can write C++ or Java in notepad, if you love misery. Don't confuse the Integrated Development Environments like Visual Studio or Eclipse with the actual programming language. Of course they used tools to create their compiler, that's how it's done. Then you re-write the entire compiler in your new language, and compile that with the C++ compiled compiler. Then, your compiler can compile itself, and you can be much more certain your language is sound.
i just learned DMD is made open source since 1.041/2.026 released in march 2009. sorry for being harsh earlier.
@d0m96 in Go, you can choose
"#2 is perfectly valid, as I have used well over 2 dozen languages and it mixes Pascal, basic, python, C"
It's OBVIOUSLY a combination of other languages. The point is that this is not BAD. Virtually ALL new languages are a combination of features from preceding languages. That's how languages evolve. Would you like me to enumerate how many languages went into something like Python or C++?
Does anyone know if it's possible to get the google tech talks as podcasts?
i think so, as they've partnered before for UTF-8
@BinaryReader In many cases you are quite right. C++ and C has its place. primarily in embedded real time systems and in time critical systems like system programming and similar. I would not use them to develop, lets say, a administrative system though...
They based 6g on Kencc(Ken's own C dialect) which is pretty close to the fastest compiler out there.
At first I was interested, though it looks/feels like a toy language that does not quite fit. Some of the design decisions they chose will make it harder to add some of the popular C++ features we use today.
If you like the idea that C needs to be improved and actually want to be able to write system libs, device drivers or a OS kernel, check out
"The D programming language"
Hi, I was wondering if the subtitles have been generated automatically or not. There're many mistakes. Here are the ones I remember:
"MT" instead of "empty"
"point arithmetic" instead of "pointer arithmetic" (critical mistake)
"to trial" instead of "tutorial"
And many, many english errors, along with a very bad punctuation (misplaced comas and points).
Thanks for posting the video
Regards,
the compiler is implementing it as 1 thread per goroutine
Yeah, I oversimplified due to UA-cam's 500-char limit. If all a thread does is inc a value then pass it to the next thread, doing that 100000 times should not be very slow despite synchronization and thread overhead et cetera. Still, the fact that you can get away with such reckless use of threads at all is pretty cool. (Though recklessness itself is not always a good trait for programmers!)
I almost wanna try that in Java now, just to see if my WinXP blows up!
first impression... sounds interesting
Do you have to work at google to have a keyboard with the theta key? ;)
D what about that? It has a lot of good features for a efficient modern language.
XXX
Understanding thought patterns can be applied to reprogram unwanted thinking into positive thinking. Patterns are regular repetitions, in one form or another, a real play of beauty and design if rightfully applied. A pattern is regularity in the natural world therefore most patterns are repeating themselves in a predictable way. Thinking requires a language and hereby thinking also underlies the same applications. Did you ever think without using your language? That’s impossible, indeed.
XXX
I hope that this great language will take the place of java in android in the futur
Concurrency is the way to go!
IMO, Go's syntax should be more like CSP's. It is hard to see the composition of processes.
What about interruption? That would be an interesting feature.
The other thing I thing is missing is the possibility to do some type of model or refinement checking ... it is possible, just look at FDR and SPIN. ;)
Good job!
This is really a good video! They are doing the same that I do!
^_^
Is that Ken Thompson as in B/UTF8/Multics Ken Thompson? Very cool if so.
@kennethadammiller Go is already out- this is just an old video.
#1 golang
#2 Other than the interface function syntax it doesn't look nearly as bad as say C++
#3 So?
#4 I'm sure if it gains popularity it will move to the top of the google stack.
the most importan question is, when will go as fast as java? Given now that go is considerable slower it makes no sense at the moment to switch from java to go. Hope that changes in the next 12 months or so (fixes in the garbage collector,etc.).
I wonder why there's no compiler support for windows, only linux and mac
XXX Thought is Precious XXX
Thinking in it’s most part is Behavioral Activity. Behavioral Activity can be programmed. Using language as a mind software we permanently are repeating our desired goals through spoken words, just like a mantra. This way we are establishing a specific pattern of information and literally downloading as well as programming the subconscious mind, which in response will trigger the programmed action. Our subconscious mind works like a computer. It turns commands..
Can anybody give me the "Clarity about Binding" as far as dealing with C Lite programming
goroutines sounds very much like Erlang processes, only that Erlang has been in production for 20 years.
@FlameHue dnt hate those that are stronger than you
What's wrong with D2 per se? Please elaborate, i haven't been following D for the last 2 years.
Also, with the language being governed by a single authority and non open source portion of DMD being x86 only, there is frankly little point in opensourcing it.
I agree with you...
falcon is a nice new language. It can do all sorts of programming styles
google "falcon language"
Seems lyk a lot still needs to be done in terms of libraries. I wonder how Go would turn out to be if Donald Knuth were on the Go development team. :)
Fast compilation also means some application may write / rewrite Go code on its own and run it in very short time.
It's good for smart scripting or research on evolving programs.
How to install Go Language in fedora 8?
I agree.
Please improve the subtitles. (perhaps ask speakers to make a transcript of their own talk)
Do you realize that it's THE Rob Pike speaking. Co-author of the 2 classic texts "The UNIX Programming Environment" and "The Practice of Programming".
Does anyone know how fast Go is, compared to C, C++, Java, etc?
I really don't know what you mean by that. But you're right. I make plenty of them and I (rather obviously) consider myself a smart people.
The only thing you said there that i could go without is blogger, i prefer tumblr for blogs.
Without Google the internet wouldn't be the same, it'd be even more of a cesspool than it is.
sounds interesting
GO GO GO !
the LDC win32 port is being dev by wilsonk , i've asked him personally via eMail if theres any possibilities for 64bit port, he replied he's working on win port in leisure times, development is a bit slow. i also asked the devs on IRC (#ldc) myself. don't call me a liar, i've been with D for few yrs already. im not going to respond to such childish comment anymore, have a nice day.
But will it blend?
@BinaryReader
Faster Development vs. Managing memory differently / increase in processing speed.
It is a trade-off alright.
Haskell has everything there is to have, and then some stuff nobody has even realized it has yet. Implementing Monad-based device drivers may be just a bit beyond the typical systems programmer, however. ;)
Haskell everything, except user base
in this day and age why opt for GCC backend instead of LLVM? Those 10% alone would come from LLVM backend.
Fascinating is to read all these negative comments nowadays. :-D
Right.
> so to change visibility ...?
Going private -> public, you shouldn't have many references to fix. The other way around, you have a bigger problem (you're breaking code anyway).
And you will get refactoring support I guess.
> I have to explicitly import a package...
Not a problem to me. Package names are short anyway. Things are explicit that way.
> and ... generics today?
because generics wasn't an initial goal ? Is it that criticail. I prefer they do it right. It took Java 10 years...
I like go!
Page 247, btw.
I try java often. only in some particular cases do such claims hold true and in no real-world apps i have seen, could the case be made it couldnt have been made faster in c
I'll keep my reply polite:
Maybe I'm wrong or dilusional then or do you really think because he did not choose a GPL licence, you think it's closed source?
Please read backendlicense.txt from dmd.1.041.zip or later
( it's in /dmd/src/dmd/ ) you'll also note the directory called "backend"
so you don't want Android , Search , Sites , Drive , UA-cam , Blogger , G+ , Glass (Soon) , Maps or Earth , and pretty much everything in the web ?
@pagola I don't, but I still fail to see your point.
The interface is why Go could be a good system language.
but then what whould happen when you actually needed one?
And I suppose the margin here is too small to hold your proof. Thanks for that, Fermat.
Always scares me when a computer scientist (mis)quotes Moore's Law
24:42 "a slightly different example."
What I want to know is how they've managed to garbage collect without a massive performance hit. I mean, it's really good for the majority of business software, but there's a reason why hardware drivers are still all written in C...
As to complaints about the language having semi colons, if you want to be able to write a statement on more than one line (can be useful for making code readable) you either need to signal the end of the statement, or you need to enforce layout. Personally, I prefer the former.
The current language is semicolon optional, you can insert a semicolon to put multiple statements per line. They are implicitly inserted if you omit them.
What if you want a single statement that spans multiple lines?
Take for example if you're using ternary operators to assign a value to a variable (using the syntax = ? : ? : ). It's so much easier to read that style of code if you can insert a new line into the statement and have the statement terminate at a semicolon, than if you have to stick the entire thing on a single line. I wouldn't want to stick a single variable assignment into an if statement if that's the only thing the condition actually affects, nor would I want to do it all in one line.
From what I understand its not the new line but whitespace after certain structures that seperate statements.
+Parker8752 "there's a reason why hardware drivers are still all written in C" The reason is called "inertia"...
Gath Gealaich
If by inertia, you mean that nobody has come up with a replacement for C that has all of its strengths, then yeah. The thing is, hardware drivers need to be efficient. Garbage Collection takes up resources. OO takes up resources (especially once you add polymorphism). Generics take up resources. When writing hardware drivers, you don't want any of these things, because you need it to be as efficient as you can possibly make it.
I mean, sure, resources aren't at near as much of a premium as they used to be, but you still want hardware drivers to use as little as possible, so that everything else the user is doing has more to work with. The reason C is still used is that while Assembly is strictly more efficient, C is easier to work with than Assembly (and far easier to port to other CPU architectures), and nobody has bothered to replace it with something better yet.
I have hopes for Rust - I hear that it compiles pretty much just as efficiently as C while being a much better language overall. If it can compile just as efficiently then it would make for an excellent replacement for C (and not a moment too soon - at nearly 40 years old, it's showing its age). Go, on the other hand, might be a good replacement for most of what C++ does (also not a moment too soon - see comment on C regarding age, but 30 instead of 40) - but unless the garbage collection is done far differently to the way most garbage collected languages do it, it can't be a good replacement for the kind of software that C is best suited to.
anaphaxeon, it's a systems language; it's meant to be on the level of C, not C#.