Hacker News new | ask | show | jobs
by excursionist 2384 days ago
> Go programs have not an obvious weak point...

Lack of generics is an obvious weak point in Go.

> Go filled the blank of lacking of a static language which is still much flexible in the world.

What makes Go more 'flexible' than C++ or Java? The point about built-in concurrency does not speak to the flexibility of the language imo.

> For example, C++ doesn't support using methods (member functions) as function values.

I would argue this is a very minor 'feature', and not very useful in C++ - you can have member function pointers in C++. Many other statically typed programming languages have supported first class functions since long before Go was around.

> Java even doesn't support function values. A single-method interface is needed to simulate function callbacks.

It pretty much does support first class functions, with slightly different syntax in some cases. Java supports lambdas, method references, functional interfaces.

> Many languages introduce lambda expressions to add some flexibility. But this doesn't solve the rigid problem, member functions still can't be used as function values.

What is the benefit of having non-static member functions as function values in object oriented languages? Also, you seem to be only comparing Go with C++ and Java, Haskell has more powerful first-class function support than Go, as do a dozen other languages.