News for hackers. Stuff that matters.
Re:Go 1.6 is Released by fpoling on Thursday February 18, 2016 @02:18AM (#11124204)
Go tools support code generators. So just use those for advanced data structures. As auto-generated it can support more features than even an advanced generics could provide.

For me the big minus of Go is that it is memory unsafe language when it runs with GOMAXPROCS>1 (default since 1.5). It is not that bad like in C as opportunities for bugs are not common, still this is an issue as consequences of such bugs is arbitrary code execution.

Another problem is lack of union types leading to poor code practice when those are emulated through (foo, err) or similar return types.

Re:Go 1.6 is Released by pcwalton on Thursday February 18, 2016 @01:47PM (#11128182)
> As auto-generated it can support more features than even an advanced generics could provide.

No, it can't. There are patterns that no monomorphization strategy (including code generation) can express. For example:

    func MakeList<T>(x T) List<T> {
        ...
    }

    func Foo<T>(x T) {
        if ... {
            Foo(MakeList(x))
        }
    }
This is a contrived example, but this shows up from time to time in functional data structures.
Re:Go 1.6 is Released by fpoling on Thursday February 18, 2016 @03:37PM (#11129114)
Code generation can do type erasure starting, for example from List<List<SomeConcreteType>>.