Domain: golang.org
Stories and comments across the archive that link to golang.org.
Comments · 114
-
Re:Added value of Go?http://golang.org/doc/go_faq.html
What is the purpose of the project?
No major systems language has emerged in over a decade, but over that time the computing landscape has changed tremendously. There are several trends:
- Computers are enormously quicker but software development is not faster.
- Dependency management is a big part of software development today but the “header files” of languages in the C tradition are antithetical to clean dependency analysis—and fast compilation.
- There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typed languages such as Python and JavaScript.
- Some fundamental concepts such as garbage collection and parallel computation are not well supported by popular systems languages.
- The emergence of multicore computers has generated worry and confusion.
We believe it's worth trying again with a new language, a concurrent, garbage-collected language with fast compilation. Regarding the points above:
- It is possible to compile a large Go program in a few seconds on a single computer.
- Go provides a model for software construction that makes dependency analysis easy and avoids much of the overhead of C-style include files and libraries.
- Go's type system has no hierarchy, so no time is spent defining the relationships between types. Also, although Go has static types the language attempts to make types feel lighter weight than in typical OO languages.
- Go is fully garbage-collected and provides fundamental support for concurrent execution and communication.
- By its design, Go proposes an approach for the construction of system software on multicore machines.
-
Re:Time to Give Go Another Look
Just skip through the tour: http://tour.golang.org/ until you find something interesting to play with.
-
Go for Web Applications?
I've been looking beyond PHP for a while, and Go seems like a reasonably good programming language (albeit not entirely comparable to languages like PHP) for web applications. Activity around Go isn't *crazy* but there are quite a few resources for what was a "beta" language up till now.
It also seems like Google is giving the project a good distance (note that the official website doesn't mention Google anywere apart from the occasional video), which I think is a good thing.
Anyone here ever used Go for anything serious?
-
There is no magic formula.
There is no magic formula. But there are some simple things that I find help me that have NOTHING to do with the language itself, or it's technical advantages/disadvantages. Strangely, they correlate in no way to popularity of the languages
You need a single document to sell me your new language. If you can't explain the concepts, basically, to a programmer in a page or two (enough that if you try to sell EVERYTHING I get bored reading the document as a whole), then it won't wash. If I can't understand why I should use your language, I won't. (Spreading it across a Wiki doesn't count, unless that Wiki has a complete copy available as a PDF or something readable.)
Your documentation should also help when I have a "how the hell do I do X?" question.
You shouldn't just assume that your way is the best. Ever. Just don't. It'll annoy me.
You shouldn't just assume that I'm happy to spend a year learning the quirks of your language.
I should be able to knock up a quick sample program, that uses one of your new features, and understand it in a matter of minutes. Literally. Minutes. Including downloading and installing your compiler / interpreter and getting it running.
Google sort of understood this with Go: http://golang.org/ They have all of the above, and even an online "compiler". They fail a tiny bit with "what's new" and selling the language, really, which is a bit of a shame, but they do a good job.
Ruby does okay too.
But PHP, one of the most popular languages, has a web-site that doubles as a bomb-site. It's hideous and has always put me off, even if they do have some of this information hidden away. It's not selling the language at all(presumably because they're "big enough" for everyone to just know about it). It's like reading a security/release-mailing blog sometimes.
C# doesn't sell the language at all, anywhere, online as far as I can tell. The first hit is Wikipedia. The next few are resource sites.
As far as I can see, C# succeeded because it was backed by a big company. By contrast, Go is still pretty obscure (which shows you there is no magic formula - Go aces a lot of the checklists but still lingers in the background). PHP succeeded because it was quick, simple, powerful and "came first" in terms of web scripting. It also created one of the web's largest security nightmares, which was something it was supposed to replace (Perl CGI).
C was popular because it was unique at the time, and powerful. C++ was popular basically because C was (that doesn't mean it didn't have advantages too, but it got popular by riding along - not by it's own merit at first, but that's what HAS kept it in place ever since).
There's no way to predict a success. Ruby / Rails came out of nowhere as far as I'm concerned and Ruby's been around since the 90's (Has it? Really? Bloody hell! Where was that hiding?). But things like Haskell were around too in that time and have never really caught on.
It seems the criteria are "ready - while being in the right place and right time", and almost the inverse of what you'd expect given a look at how much they want to ease programmers in. It seems that if you want to stand a good chance of being the next-big-thing, make an awful website, don't put up examples, make the simplest thing complicated or impossible, make an horrendous security mess, and then put it online. Then find the next fad, say your language is perfect for it, and push it everywhere you can.
-
Re:Pffft.
There are a few problems with functional programming languages that have prevented their true adoption anywhere.
1. Limited paradigms - I always prefer languages that let me write my code the way I want, a la C++, than a language that requires a strict paradigm from academia like Lisp. If I want to use the inherent hardware property based side effects of certain code structures, let me. Programming languages =/= mothers.
The problem with a language that "lets you write the code the way you want" is that most people don't want to read code that's been written the way you want to write it. That may also include you six months from now; you end up with code that's hard to read and hard to maintain.
2. Difficulty. 90% of programmers (not on the internet, in general) write code like Fortran when its 2010. The most popular languages now, C# and Java, are popular because they are extremely easy to understand, if not easy to get things done in. You dont need to know lambda calculus or templates or prototyping to understand 99% of C# / java code (yes, I know C# has all of those and java has 2/3 of those). The problem with functional languages is that they always use these paradigms.
I'm not sure I'd consider Java "extremely easy to understand." I find Java code very hard to read, if only because the syntax is so cluttered. I'm not a functional programmer at all, (I mostly program in Go) but I think lambda calculus is an interesting concept, if only because it's very different from how I usually write programs. Object-oriented programming (at least, as it's done in Java) is also quite different from what I'm used to doing, and I think it's an interesting approach to writing programs as well. Neither way is really "better," just different.
I mean, I dont use them. Thats personal preference. I like the way C and OO work more than I like dynamic typing and having no data and all the other out of this world paradigms. I really hope that D can achieve what I hope it will evolve into, a language that is hopefully as easy to understand as Python without the boilerplate of Java but with the performance of C. Thats kind of where the end goal of programming languages needs to be.
Have you checked out Go? It fits your description pretty well, though your mileage may vary as to how well.
I agree with the linked article in that we need more languages, but those languages need to try to do less. For instance, you mentioned that 99% of C#/Java code doesn't use lambda calculus or templates or prototyping; then what's the point of them being in the language if nobody uses them? This also gets back to the point I made above about C++; when you try to do everything really well, you end up doing everything poorly. Go is my favorite language not only because of the features it has, but also because of the features that were deliberately left out. Sometimes, trying to program in a language that doesn't have everything is easier than trying to program in a language that does.
-
Go rather than C
I think Go would be a better choice. C's great and all, but rather than spending development time "building useless OOP frameworks," they'll be spending their time managing memory; considering they're PHP/Python/Ruby programmers, it's possible most of them don't have a lot of C experience. Go would be a much better choice in this case. You'll still get a significant speed increase, though not as much as C, but it's garbage collected, so you don't have to learn how to manage memory all at once. Many people on the mailing list have come from a dynamic language like Python or Ruby, and say Go is a great improvement because of the type safety and performance. I haven't done much web programming myself, but ask around on the mailing list, there's plenty of people doing that sort of thing.
-
Re:Translation
Yes! Just like Go, which is clearly not just the thirty-second most popular language.
-
Re:Quorum looks a lot like Pascal
Why is this a bad thing?
Because unless the editor is truly idempotent, in the formatting, after you've reformatted, and then reformatted again, your version control system may think you changed lines that you didn't. This causes erroneous conflicts in merging, and renders history annotation useless.
Which allows me to rant a little: one of the best and worst things about Go is gofmt . It's nice to have such a tool; it's not so nice that it defaults to using the OS's line endings. If you're going to define whitespace rules-of-thumb, don't wimp out when it comes to line endings.
-
Re:Quorum looks a lot like Pascal
Why is this a bad thing?
Because unless the editor is truly idempotent, in the formatting, after you've reformatted, and then reformatted again, your version control system may think you changed lines that you didn't. This causes erroneous conflicts in merging, and renders history annotation useless.
Which allows me to rant a little: one of the best and worst things about Go is gofmt . It's nice to have such a tool; it's not so nice that it defaults to using the OS's line endings. If you're going to define whitespace rules-of-thumb, don't wimp out when it comes to line endings.
-
Re:Bad article and summary
Why don't they go back to the source, learn the mistakes that Java made (yes, some were just design decisions, others were due to the limitations of computing back then) and create a language initially based on C++ with the good bits of that included.
I think that was called 'Go'
-
Go
Did anyone really start using the last language they used, Go?
-
Re:Oracle?
I have helped write non-trivial programs in Go. It's quite pleasant. I think the big reason Google hasn't bothered to provide "adequate tooling" is the developers. That is, I think many of the creators and big users prefer to just work with a plain text editor rather than an IDE. There's a reasonably decent Emacs mode for Go, but it's readable enough without any syntax highlighting, and gofmt will fix your indentation and such for you. As for the debugger, well, there's http://blog.golang.org/2010/11/debugging-go-code-status-report.html (very old but even then they already had GDB support going), but as the first line says, "When it comes to debugging, nothing beats a few strategic print statements to inspect variables or a well-placed panic to obtain a stack trace", which is all I ever used to debug my Go code--and found it reasonably painless! Oh, and regarding generics--I'm not sure they'll ever go in. It is proposed CONSTANTLY on the mailing list, and Pike et al always indicate that they're not interested.
-
Re:Oracle?
-
Re:But what about non-static pages?
It will be transformed into Go.
-
Re:Yesterday?
Linux is fine, Java is the problem. And they're working on a better language already.
-
Re:hmm.
Oh, but this has already happened, only with different people than those you mentioned. Take a look at Go.
-
Re:Ken Thompson is also at Google?
His current work has mostly been on a new programming language called Go (for those who have not heard of it). A young, but thus far impressive systems programming language.
-
Re:Is C++ ever the right tool for the job?
If you need/want static typing, but the lightweight feel of dynamic languages, plus high performance and extremely fast compile times, you might want to try Google's Go.
-
Re:One area in which I appreciate the Java's power
Exactly, and this is one of the many advantages that Go has over Java (and even over C++, which also can be extremely slow due to the huge overload of dynamic linking, hence hideous hacks like 'prelinking'.
Startup time and memory overhead *does* matter, and all 'benchmarks' out there that claim that Java performance is competitive completely ignore both.
-
Re:Imagine
No data may be both mutable and aliased
Perhaps a little off topic but do you know an online article that explains this in detail? (I'm writing my first concurrent server at the moment (in Go) and could use any information on the topic)
-
Re:Python is nice
If you're looking for web backend, first of all, I wouldn't choose Go for anything. It's too young and too prone to change in weird ways, and it's got an exception handling mechanism that's... exceptional. Like nothing you've seen before - for good reason, I believe.
Here's why...
We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programmers to label too many ordinary errors, such as failing to open a file, as exceptional.
Never throw an exception when an assert would do! I have a few issues with Go, lack of exceptions is not one of them. Especially when Go's mechanism makes more sense for concurrent program execution than exceptions.
Currently I'd probably pick Node.js over Go for a web app. Python and Ruby would be towards the bottom of my list of candidate languages and I was using Ruby long before the Rails hype.
-
Re:Python is nice
If you're looking for web backend, first of all, I wouldn't choose Go for anything. It's too young and too prone to change in weird ways, and it's got an exception handling mechanism that's... exceptional. Like nothing you've seen before - for good reason, I believe.
Here's why...
We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programmers to label too many ordinary errors, such as failing to open a file, as exceptional.
Never throw an exception when an assert would do! I have a few issues with Go, lack of exceptions is not one of them. Especially when Go's mechanism makes more sense for concurrent program execution than exceptions.
Currently I'd probably pick Node.js over Go for a web app. Python and Ruby would be towards the bottom of my list of candidate languages and I was using Ruby long before the Rails hype.
-
Re:Why Go?
The thing that pisses me off most about Go is having the lexer manage semicolons. Essentially it forces a style of coding that I dislike. I prefer to open braces on the following line as it makes it easier for me to read the program. It has some nice features that I like, but forcing a coding style like that is annoying.
-
Re:mm
Given that Google is on the sharp end of Oracle monetizing Java, anyone else think they might start to push Google Go really hard? It's immature at the moment but it looks really nice and I think as it matures it could really catch on.
-
OpenBSD was my first *NIX
That was more than ten years ago, and OpenBSD is still the *nix OS that remains closest to the original Unix style and spirit.
Being a BSD variant it means it already started to deviate from the Unix way long ago, but with the notable exception of Plan 9 (not surprising given that the original Unix team were responsible for Plan 9, and by the way now are working on Go), all other *nix-like systems are much, much worse.
The quality of OpenBSD code is also much better than that of any other popular OS, and its developers are usually fairly good at restraining themselves from implementing popular 'features' that simply add complexity and no real value.
In short, if you like simplicity and quality, give OpenBSD a try, I'm still very grateful it was my first exposure to *nix systems.
-
Article author didn't read specMr. Pike _did_ tear down the wall. The author didn't read the spec for Pike's language. From the article:
Unicode has the entire gamut of Greek letters, mathematical and technical symbols, brackets, brockets, sprockets, and weird and wonderful glyphs such as "Dentistry symbol light down and horizontal with wave" (0x23c7). Why do we still have to name variables OmegaZero when our computers now know how to render 0x03a9+0x2080 properly?
The go spec is defined in terms of unicode, and specifically gives non-ascii characters as example identifiers. Go source code is defined to be UTF-8.
-
Re:Here we go again (SCO)
They could always move to The Go Programming Language. It's Google's homegrown attempt to get something in between Python and C++. It's got a lot of neat concepts in it and could eventually be a real competitor to JAVA IMHO. The standard libraries still need a lot of work, but in a few years, especially if Oracle screws up Java, it could enter the mainstream.
-
Re:Barrelfish
From what I remember (hopefully correctly) engineering cache coherent shared memory architectures is increasingly difficult as core counts go up. Intel built a experimental processor that utilizes low latency message passing instead of shared, coherent cache. Nvidia and Ati have quite capable vector architectures as processors do not have shared cache, just as IBM Cell SPU's are somewhat capable as well. Distributed memory and message passing seem to have a bright future. Didn't SMP systems these days look and act internally like distributed systems?
When we get to 48 cores same programming models might not be available at all. Barrelfish seems as quite sensible and interesting preparation for the future. Or perhaps Plan 9 will finally get to rise. I think I'll learn Go in the meanwhile, it has this interesting concept of "sharing memory by communicating".
-
Rob Pike and Ken Thompson at Google
I think Google ought to encourage Rob and Ken to move their language experiments further along. And build up a solid toolset around that new (free) language for developers to adopt.
Right now they have Go, which needs to be taken a little further along to be as good a Limbo. I think there was another language that they worked on, but I don't recall what it was. -
Re:Google Go
Google also worked on Wave for some time... and Go is not that mature exactly...
-
Why should Google keep externalizing?
Don't get me wrong, Google has a policy of open platform in terms of cooperating with other corps when it strengthens their position (like Flash for instance) and they won't mind C# if it gives them advantages.
Still, it's a risk, same like Java.
You know, if I'd be Google, I'd think about how to come up with something that mitigates this risk, and maybe brings some first mover advantage.
I've not been surprised if they'd come up with their own programming language, that'd just blow the other's away.
They don't seem to be against it, as they do develop new programming languages like the Go programming language.
Don't get me wrong, I don't like Go. The coding style of the standard library is an ugly CamelCase style thing that just makes me want to run away. But it has some very interesting programming paradigms behind it. And Google is using it to some extent already. Maybe they have something even better that they don't tell the world about yet. I mean, that's a very central aspect of their daily bread, I can't imagine them not have thought about it for long and deep hours.
-
Let's imagine if someone did the same to Google
Google decided to use the java language in Android. It appears that they did so because it was a decent programming language and many programmers were already familiar with it. For licensing reasons they didn't use Sun's branded Java runtime, but instead pieced together their own compiler and set of class libraries from multiple sources.
Sun didn't like what Google was doing (says various sources), but no legal action was taken until Oracle swallowed up Sun and levied a double-combo patent-and-copyright lawsuit against Google.
---
So, if those are the facts, what would happen if some big company like Oracle, Yahoo, or Apple were to do something similar to Google?
Google has their own programming language, Go.
Unlike Java(tm), Go is under a BSD license, and includes a patent grant to all relevant patents that Google owns or can license to you. So if Apple or Amazon or whomever wanted to create a programming layer on top of which proprietary software could be written, you could just use Go as it exists right now and Google wouldn't be able to sue. (It's unclear what motivation Google would have to sue, anyhow)
While I'm a strong supporter of Free Software, I'm quite opposed to tying-up the specs of programming languages, file formats, and transmission protocols using copyrights, patents, or trade secrets, even if only under a Free Software license . Sure, an optimized version of a compiler or a parser might be available under a more restrictive license, however one should not be held over a barrel due to the programming language they used or the format in which they decided to store their data or code. Those specifications and programming features necessary for implementation should be completely unencumbered.
-
Re:new language
-
Re:I think Oracle is right
It's not targeted at systems level programming it's the beginnings of a completely new type of language. The fact that it's used mostly for console based stuff is simply because there aren't enough libraries re-written in the language.
http://golang.org/doc/go_faq.html#What_is_the_purpose_of_the_project
-
Re:I think Oracle is right
They've already created Go. But nobody wanted to learn it, yet.
-
Re:Understatement of the year
If he is such a marvelous "computer scientist", then why the hell does he not understand the basics of programming language design? In http://golang.org/doc/go_lang_faq.html#semicolons it states that semicolons "are for parsers, not people". However, any student who has taken an intro to compilers course will tell you that semicolons are actually superfluous when it comes to parsing a token stream into an abstract syntax tree. Most programming languages can be massaged into an LR(1) grammar, and if he is CREATING A NEW ONE, then he sure as heck could have managed the feat! (Every student in my first compilers course was required to do just that, full language with no semicolons.) Instead, he failed to understand why semicolons were used but are not necessary, and instead unwittingly grandfathered in decades of legacy crap by inventing a language that requires semicolons for no good reason, yet is written without them and then HAS SOFTWARE PROGRAMMATICALLY INSERT SEMICOLONS INTO YOUR SOURCE CODE BEFORE COMPILING IT!
What a brilliant computer scientist.
-
Re:C too complex? Hilarious.
I find it very ironic that the guy is complaining about the complexity of C++, while his most recently designed, brand new spanking language that's supposed to be different, still has that weird notion that 0123 is not the same number as 123. You'd think it would be one of the things that top any list of "how we can make this better than C".
-
go home site
The project URL is here: http://golang.org/ Looks promising...
-
The return of C?
Although we went through a period thinking we have an abundance of CPU power, efficiency is back in vogue as it's needed everywhere from the mobile, because of limited cpu/battery, to servers trying to solve the the C10K problem (serving >10K simultaneous connections).
Couple of interesting projects are the Redis server, written in tight ANSI C, and the Go language, kinda like a combination of C++ and python with a nod towards erlang.
http://code.google.com/p/redis/
Redis is an advanced key-value store. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists, sets, and ordered sets. All this data types can be manipulated with atomic operations to push/pop elements, add/remove elements, perform server side union, intersection, difference between sets, and so forth. Redis supports different kind of sorting abilities.http://golang.org/doc/go_faq.html#What_is_the_purpose_of_the_project
-
Completely or mostly?
Are they going to go the way of Go for all of their other development activities?
-
Re:Android and Blackberry anyone?
Don't forget go.
Although I imagine that we'll eventually see C/C++ disappear for user-facing applications, I'd place money on Go become the "de-facto" systems language at some point in the future, simply by virtue of the fact that nobody has pushed the envelope in this area in many years, and Google have some of the best minds in CS working on Go.
The "java everywhere" mentality also hasn't worked out all that well for some companies -- ask any poor soul who's been forced to develop for the Blackberry.
-
Re:Linking with other languages
-
Re:"many developers are so intrigued"
Can I get some sense of how you determined that Go was proprietary, then?
I don't think it's reasonable to call any language proprietary whose spec is licensed under CC-A and managed by an open team outside of the company. That's really hard to back up, and I'd need some kind of source for that.
C# it ain't.
-
Re:"many developers are so intrigued"
"Proprietary"? No, open source
I'll concede Google is a single company, but the Go developers I've encountered are all outside Google, and speak very warmly of Google's Go team.
Translation: there is much astro-turfing on them thar intarwebs. This ain't it.
-
Re:Google
Oh come on, was it really a surprise to anyone that Google does only care about OSS when it suits them and drops out instantly when it doesn't. All of their own sites, business and back-end technology is just as closed as Microsoft's.
Where's the open source c# compiler from MS?
Though it certainly isn't clear how much (if any) they are depending on go.
I'm just picking one example, here.
-
Slices from xmlrpc
typedef struct _xmlrpc_mem_block {
size_t _size;
size_t _allocated;
void* _block;
} xmlrpc_mem_block;I think http://golang.org/doc/go_for_cpp_programmers.html#Slices are picked from http://xmlrpc-c.sourceforge.net/
-
Re:C vs C# is a poor comparison
Can someone explain how this differs from Erlang? It is briefly mentioned on the Go site:
"One of the most successful models for providing high-level linguistic support for concurrency comes from Hoare's Communicating Sequential Processes, or CSP. Occam and Erlang are two well known languages that stem from CSP. Go's concurrency primitives derive from a different part of the family tree whose main contribution is the powerful notion of channels as first class objects."
http://golang.org/doc/go_lang_faq.html
http://ftp.sunet.se/pub/lang/erlang/index.html -
Re:Google should rename Go to Issue 9From the FAQ
What is the origin of the name? “Ogle” would be a good name for a Go debugger.
So, they'd have to come up with a new name for the debugger... and it probably wouldn't be half as clever!
-
Re:People! Punctuation is IMPORTANT!
> Google's language is called Go! (with an exclamation mark.)
-1, Wrong
Err, no it's not -
Re:Build-in function library
Actually it has some decent libraries already, at launch. See http://golang.org/pkg/
I wrote a multithreaded telnet talker without having to care about threads or mutexes or shared memory access or select() or poll() or whatnot. Some channels and a few goroutines, and it all works really, really nicely.
THe syntax is a little weird, sure, but after a day of coding in it, its fine. You get used to it, and I find it easier to pick up than say, haskell.