by gamesbrainiac · 11y ago · 0 comments
Very true.
This article hits the nail on the head. Most people say that they cannot "express" certain things in go, or have to jump through hoops to do it. The point of go is not to create a highly expressive language, but rather to create one that has a high enough abstraction to be productive but simple enough so that people coming from different backgrounds can acquaint themselves with it quickly.
In other words, it is a language for teams.
Reminds me of Java. Although, Java gets increasingly complex these days. It also started out without generics.
Not coincidentally, Golang sucks at this problem.
But there is something about writing in Golang that makes it easier to dive into meatier code. For instance: I've written programmable assemblers in Ruby and in Golang. With Ruby, I kept refining the assembler until the DSL looked identical to normal X86 assembly (I even hooked the bracket operators to make them behave like dereferences). With Golang, I quickly moved past the assembler into an IR and a compiler.
Same experience here. I am working on a neural net dependency parser and pretty much started C++ and Go implementations in parallel, because this was one of my first larger Go projects and I had my doubts about using Go for this.
In the meanwhile, the Go implementation is a complete and fast parser (the number crunching is done using OpenBLAS via gonum), which I now use for research. In C++ I am still tweaking the abstractions for the basic stuff (word embeddings, transition systems). Of course, I could make a simple, straightforward implementation in C++, but the language encourages you to finetune the abstractions and you have to the choice between template-heavy/light code (with its respective downsides).
I also found that Go encourages me more to break stuff up more in different packages. In C++, every separate library means new build machinery, some way to roll it out on systems, etc. In Go it's as simple as creating a new repository and adding imports.
That is a great way to compare languages. Incidentally, that's the same way I feel about Scala vs Python.
1. Go channels: send every value over a channel.
2. Callbacks: provide an iteration function which takes a callback function.
3. Closures: let a closure return the next value when called.
4. Iterators: create a separate iterator type with e.g. HasNext()/Next() methods.
In this respect C was much simpler, because only (2) and (4) were really possible (and sometimes indexing).
edit: Okay, 3 should work too, sorry.
>KDE (1996)
>LibreOffice (based on StarOffice, 6.0 released in 2002)
>VLC (2001)
>LLVM (2003)
I think you have a point r.e there being more smaller projects than large projects with large teams. But this is a terrible argument. Go was released in 2007. Are you being facetious or are you suggesting that porting a mature codebase to Go is that easy? CoreOS was released in 2013 and so was Docker. I know that Docker actually ported to Go after the fact, but it was still relatively young and Go was already mature by then.
Also, despite Go's short existence, there are already a surprising number of large Go project (Docker, Syncthing, etcd).