5 ms·
>Go aka golang is an amazing language By what standard? I've been very underwhelmed. The type system is very mediocre. Support for generic programming is awfu
by wyager 13y ago
>Go aka golang is an amazing language
By what standard? I've been very underwhelmed.
The type system is very mediocre. Support for generic programming is awful. What kind of language idiomatically involves casting to the top type? That would be like if Java idiomatically involved casting to Object, or C++ idiomatically involved casting to void*, just to get any sort of genericism. Look at almost any big Go project; the abundance of {}interface typed variables is alarming
And then how about language extensibility? Go relies heavily on built-in keywords, like range and make(). You want to range over a tree or a linked list? Too bad. You can only use built-in types. Or maybe you can wrap your data structure in a chan and range over that. Goodbye performance and simplicity.
Go is not a bad language. I use it on a number of web projects, and it works very well. But Go is not, by any metric I can think of, an "amazing" language. At best, it is a decent language with lots of corporate support, a good standard library, and some good tools like golint, go get, and go fmt.
- kyrra 13y agoI'd agree that Go's language syntax and symantics are very simple at this point. I'm really hoping they improve some of these simple use cases with Go2 whenever that comes about. What I really like is the whole toolchain that comes with it. Fast compile times, cross-compiling, static binaries for easy deployment, gofmt, godoc, gocode, etc.
- pjmlp 13y ago> What I really like is the whole toolchain that comes with it. Fast compile times, cross-compiling, static binaries for easy deployment, gofmt, godoc, gocode, etc. If it also had an OS coded in it, it would be called Oberon (1992).
- 0xdeadbeefbabe 13y agoThe name Oberon would be easier to google too. An alarming number of false positives taught me to search for "golang" instead. A small baseline level of alarm is good when you are programming in go for obvious reasons, including {}interface etc.
- gnur 13y agoThen what would you call an "amazing" language. For me, go is quite amazing, because when I write something and it compiles, in 90%+ of the cases it does exactly what I wanted it to do. Something that I only achieve in python after using it for at least 5 years and I have only used Go for the last year or so.
- kasey_junk 13y agoThat sounds simply like strong typing vs dynamic.
- enneff 13y ago> Look at almost any big Go project; the abundance of {}interface typed variables is alarming This statement seems weird to me, so I checked Camlistore (the biggest Go project on my machine). In 65621 LoC there are 306 mentions of interface{}. And Brad does tend to do "clever" things that I probably wouldn't do, so I honestly expected the number to be a lot higher.
- wyager 13y ago>there are 306 mentions of {}interface Would you be happy with a Java project with 306 mentions of Object?
- enneff 13y agoI wouldn't be happy with a Java project with 306 mentions of anything. Go's interface{} and Java's Object not the same thing, nor are they used for the same ends. Eyeballing the Camlistore code I am not distressed by its use of interface{}. It's fine.
- wyager 13y ago>I wouldn't be happy with a Java project with 306 mentions of anything. Please expand on this. >Go's interface{} and Java's Object not the same thing, Yes, they are. They are both the top type. >nor are they used for the same ends. Yes, they are. Did you ever use Java before they added Generics?
- dsymonds 13y agoGo does not have type inheritance, so there's no such thing as "the top type".
- friendly_chap 13y agowyager is right, empty interfaces in Go are exactly that - a type (set) which every value is a member of, search for Go/interface{}: http://en.wikipedia.org/wiki/Top_type http://en.wikipedia.org/wiki/Top_type Edit: the downvoter cares to explain?
- PopsiclePete 13y agoI don't know what your definition of "amazing" language is, then, but a decent language with corporate support, a good standard library and good tools....is...well...pretty darn "amazing" in my book. It maybe doesn't tickle me on an intellectual level, the way Haskell or Clojure do, sure, but for getting real work done, I'd choose it any day over those two. Other "exciting" languages that play in the same field as Go are perhaps Rust and D, but neither of those have the same corporate/community support, tools, eco-system, etc.
- wyager 13y ago>but a decent language with corporate support, a good standard library and good tools....is...well...pretty darn "amazing" in my book. This also describes Java in 1997. I wouldn't call that an amazing language either. >Other "exciting" languages that play in the same field as Go are perhaps Rust and D, but neither of those have the same corporate/community support, tools, eco-system, etc. I don't know enough about D to speak about it, but at least Rust has a good type system (based on hindley-milner), support for generic programming, pattern matching, extensibility, etc. I'd personally call Rust "well-designed".
- renox 13y ago>This also describes Java in 1997. I wouldn't call that an amazing language either. You're joking right? I've used Java around 1998 and its standard library wasn't good, "java can't print" was quite true back then..
- disputin 13y ago"It maybe doesn't tickle me on an intellectual level, the way Haskell or Clojure do, sure, but for getting real work done, I'd choose it any day over those two." Agreed. I'd suggest perfect for the world's dark matter devs.
- Dewie 13y ago> I don't know what your definition of "amazing" language is, then, but a decent language with corporate support, a good standard library and good tools....is...well...pretty darn "amazing" in my book. That's amazing tooling, something which can be had even if the language itself is just decent. I'm not trying to be pedantic; I think the distinction matters.