5 ms·
Java also has null and overall a weak type system. They're pretty close in that respect, actually.
by dontlaugh 3y ago
Java also has null and overall a weak type system. They're pretty close in that respect, actually.
- pjmlp 3y agoFrom the point of view from Go folks, we need a PhD for mastering Java's type system.
- dontlaugh 3y agoIt has slightly more expressive generics, but otherwise no more complex overall. And no more useful, except perhaps for typed errors. The biggest cause of bugs in Go I find is the weak type system. Nulls, untyped (and overly verbose) errors and the lack of sum types are a big problem.
- pjmlp 3y agoProper enumerations, sum types, pattern matching, exceptions, default interface implementations, dynamic loading, class loaders, annotations, compiler plugins,...
- dontlaugh 3y agoJava sum types and pattern matching are almost impossible to use in practice, sadly. Exceptions aren't a good thing, it's only good that they're typed. Go has exceptions too, they're just used rarely. The rest is not very interesting or particularly complex.
- pjmlp 3y agoWord salad, hand waving that Java has indeed a much better type system.
- dontlaugh 3y agoIt’s a little better, for sure. It’s nowhere near something sane like OCaml or Rust. I don’t particularly like Go or Java. I don’t see what salad has to do with anything I said. Go does have exceptions and unlike Java, they are untyped and rarely used. They’re not great in either language.
- demi56 3y agoYou’re loading your ideas of other languages into Go and with this current Go team that’s wishful features
- pjmlp 3y agoNot at all, I rather use other languages instead of dealing with frustation. I apreciate what Go offers as a better C alternative, similar to Limbo's role in Inferno, and that is the only thing I will advocate Go for.