4 ms·
My thoughts on Google Go: 1. Terrible name 2. Theres no reason to keep to C-style syntax 3. go <function> is a nice feature 4. Control structures add nothin
by dkersten 17y ago
My thoughts on Google Go:
1. Terrible name
2. Theres no reason to keep to C-style syntax
3. go <function> is a nice feature
4. Control structures add nothing new and just seem generally underwhelming to me
5. The built-in data types are an improvement over a lot of languages, but are underwhelming when compared to something like Clojure, Haskell, OCaml or Factor
6. Channels are a great way of dealing with mutable data in a concurrent environment, but I'm not convinced they're enough
7. Slices and pointers without arithmetic are a good idea
8. The interface system seems like an interesting idea
9. I'm not sure I understand how this is to be a "systems language", especially when they say that its impossible to do manual memory management
10. Lack of things I like: lisp-like macros, closures, pattern matching, parametric types, dataflow constructs, iterators, list comprehension..
Though I personally don't like the syntax very much, it is certainly familiar and easy enough to pick up, so I imagine this will be useful to a lot of people. I think Go is an interesting experiment which will, hopefully, lead to some more powerful and interesting languages, but I cant see myself ever using Go itself.
Its nice to see a C-like language take concurrency more seriously, but after having used Clojure a lot over the past month or two, it just doesn't really seem so concurrency oriented to me.
- mncaudill 17y agoOn point 11, the language has closures.
- dkersten 17y agoSo it does, oops!
- vital101 17y ago"6. Channels are a great way of dealing with mutable data in a concurrent environment, but I'm not convinced they're enough." Channels are a fantastic for concurrent environments. I took a distributed operating systems course during my graduate work, and we used Inferno as the environment and Limbo as our programming language of choice (you'll notice that one of the developers helped write Limbo). Channels made communicating between threads extremely easy as they could by typed to anything you wanted (primitives, ADT's, etc). Will they be enough? I'm not sure, but my experience tells me that they probably will be.
- dkersten 17y agoTheres no doubt about them being a great concurrency model, which is why Erlang uses this approach. Shared-nothing message passing is actually my favorite non-dataflow approach to tackling not only concurrency, but also a means to build flat hierarchical software components. However, there are some problems which are not easily modeled in this way. Some people claim that for some problems, this method isn't suitable at all (I'm more inclined to say that its simply more difficult or messy, but IMHO thats reason enough). Sometimes shared memory based concurrency is needed for performance. Whatever the reason, I'm not convinced that channels are enough. This is one reason why I like Clojure's concurrency support: clojure's agents are similar to go's channels, but clojure also supports shared state, using software transactional memory to ease the locking/synchronization pain. Also, since clojure code is, by default, functional, operating on immutable data-structures, a lot of logic is inherently thread-safe at no effort to the programmer. Yet in some cases even that isn't desirable. So it lets you code however you need, and since Clojure is hosted on the JVM, you can revert to using Javas monitor-based concurrency model when it makes sense. I don't think Clojure solves the worlds concurrency issues, but I'd argue its a lot closer to doing so than Go, even if its just because it gives you the choice to pick the model that suits your particular problem the best. I don't actually mean to be advertising Clojure, its simply the most concurrency-oriented language I've been spending a lot of time using lately, so its easier for me to compare and contrast Go with it.
- lacker 17y agoGo isn't trying to replace Clojure, Haskell, OCaml, or Factor. It's trying to replace C++.
- dkersten 17y agoSure, I'm just saying that for me, personally, it doesn't add enough to make it worthwhile[1]. D is a great C++ replacement too and I think one of the reasons it never really took off is because it just doesn't add enough to be worth it (and D adds a good few niceties while still being familiar enough that C++ programmers can pick it up quickly and easily). Admittedly, D has a few other issues, but I don't feel they're relevant to this conversation - Go might have them too, who knows. Having said that, I'd probably prefer people write code in Go over C hacks. [1] C++ was my language of choice for a few years, so I do, at least partially, compare a language to C++ when I learn a new one and not only to <latest cool language>, though I admit I do that too.
- adamc 17y agoSure, but is there enough demand for that for it to really succeed? D hasn't, really.