Re:Why Go and Not Rust?
by erik_seaberg on Monday September 16, 2019 @03:07PM
(#20987462)
Multiple return values are a lot less general and harder to use than tuple values; you can't store them in maps or pass them over channels or compose functions (while f(g()) works, f(g(), h()) is not allowed).
You could implement an entire corner of the language to work with special-cased / non-reified MRV, that's what Common Lisp does.
Go doesn't do that though. There is some magic for builtins (e.g. variable-arity MRV) but as usual mere mortals need not apply.
Re:Why Go and Not Rust?
by otabdeveloper2 on Monday September 16, 2019 @03:18PM
(#20987584)
> C++'s approach to generic type usage has slowly evolved into the most absurd collection of left angle brackets out there
C++ templates are a purely-functional Lisplike language. There's nothing strange or absurd about it; it's a very vanilla way to approach string rewriting systems.
(It's ugly to read, yes, but then all Lisplikes are too.)
Go is interesting and I really wonder how it'd be doing if someone went all in on the multi-return syntax sugar (pretty awesome stuff), the prohibition (mostly) on exceptions, channels and trivial threading and a bunch of other nicely packaged features while giving some ground on Generics. All languages have their warts, but I think this one is particularly easy to address - though it may take a major version bump and introduce some BC breaks I feel like those could be minimized, the biggest cost would be library incompatibility.