Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Notes about Go (bitbucket.org/fusiongyro)
57 points by bdr on Nov 23, 2009 | hide | past | favorite | 14 comments


    In (path ChecksumIterator) Iter() you see something which is hard to explain verbally. Essentially, it provides a generator façade for what is underneath the surface a bucket being filled by four threads ("goroutines") concurrently. Unless things have changed markedly, it would be very difficult in Python to create a generator which produces its values with the help of some number of threads.
This is actually very easy in Python -- use a Queue[1], spawn some threads to populate it, and read from it in a generator.

Go seems interesting, but many/most of its praised features are already done better in other languages. For example, while it supports "thousands of goroutines" (green threads), Haskell supports millions of green threads[2]. Even Stackless, which is not known for performance, has faster gthreads[3].

Go also perpetuates several mistakes from C (ugly brace-delimited syntax) while dropping the true genuinely useful features (pointer arithmetic, manual memory management). Considering the wealth of high-quality, high-performance languages with mature library and compiler support (Haskell, Erlang, Factor, OCaml, even Ada), I'm mystified as to why Google would invest the time and energy into promoting yet another C clone.

I suppose in a year, Go will be another mostly-abandoned language with a few users poking around the mailing list asking "what happened?". Most News.YC readers can name at least one language released to great fanfare, but with little developer adoption.

[1] http://docs.python.org/library/queue.html

[2] http://www.reddit.com/r/programming/comments/a4n7s/stackless...

[3] http://dalkescientific.com/writings/diary/archive/2009/11/15...


I think the Google angle has been overblown. Sure, all the designers are from Google, but Google employs a number of people who are prominent in one language or another - Guido, for one, and Bram Moolenaar is working on Zimbu. It got posted to reddit by one of the Google people as "from Google", and the first talk was done at Google, so I think everyone just made an assumption. Google is nowhere on the front page of golang.org, and the developers are using @golang.org addresses.

I bet the developers are surprised at the media storm and wouldn't have otherwise gotten it except for that initial Reddit post explicitly tying it to Google.


If not for Google, GO would never have been noticed much less commented on by anyone important.


While true, GO is not unique in this respect:

- C was noticed due to Bell Labs

- C# was noticed due to Microsoft

- Java was noticed due to Sun

- etc


I was really commenting on the fact that GO is absolutely not unique in most regards.

For instance my main beef with it is that in a world where Ruby exists there's no excuse for that kind of crappy all over the place syntax.

The brackets seem to almost be there just because anything without C-like syntax gets ignored.

[edit] But +1 from me to you anyways.


For instance my main beef with it is that in a world where Ruby exists there's no excuse for that kind of crappy all over the place syntax.

In a world where Lisp exists, there's no excuse for syntax.


Ah, come on! The rules governing how s-expressions are made up are still SYNTAX!

But I do agree with your point ;-)


Arguably, 'syntax' is the set of rules to transform code into an Abstract Syntax Tree. Lisp's code directly represnts the AST so you could say there is no syntax (to be a little more precise I might say Lisp is homoiconic, though).


I'd still argue the textual format is not the AST itself, but a textual representation (just like any code) which is the transformed into the actual AST at parse-time using the syntax rules. Therefore, s-expressions have syntax, even if its minimal.

(x y (z a)) is code, its parsed according to the rules of the syntax and is converted to an in-memory AST representation.


You're barking up the wrong tree, pure s-exprs are a raw expression of the AST.

A much better argument would be to point to all the damn quoting operators in most Lisps, which are most definitely syntax (sugar, even).


Oh, good point, thanks! And built-in reader macros..

But really, even pure s-exprs are just one possible textual representation f an AST. Hell, XML is a valid representation too. Anything thats a representation of something follows rules as to how its represented and if it has rules, then its got syntax.

But.. you're right, arguing about the s-exprs part isn't going to get me anywhere. The Lisp weenies* will always believe Lisp has no syntax (blatantly ignoring the quoting operator which you mentioned) and nobody else really cares, so...

* I'm not trying to knock Lisp; I actually quite like Scheme and Clojure (and probably would like Common Lisp too, if I'd spent more time with it). I just think this whole "it has no syntax, yet I have to follow these precise syntactical rules" stuff is stupid. ;-)


and there's no 9P library in sight

Well, it so happens that someone wrote one just in time - http://bitbucket.org/f2f/go9p/

Funny coincidence that I was reading ths story right now, and I got a mail in the 9fans archive about this 9p implementation written in Go, and to top it, look at the domain name !


An excellenrt arrticle with a couple of verey good examples.


> Plan 9, for example, has a fan mailing list, but there is no official mailing list sanctioned by the labs, and never has been. If you asked for a feature in Plan 9, you were usually told to go _ yourself, the blank usually being 'write it' but many other suggestions were also common. XML is the hated enemy, if you don't like the colors, edit the source code, Emacs is the devil, what other platforms, and 9P is the only protocol anyone will ever need.

9fans is the official mailing list Dan, you should know that. I think you are characterising us as a bit hostile. We are rightly dubious about the merits of XML. Emacs is just a tool on another system. I would say "Go write it yourself" is a usual response from a small group of devs working unpaid on a project. Considering the number of non 9p protocols implemented in plan9 I think you are being rather unfair.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: