| Trying not to devlove into an ad hominem, I don't think you're arguing in good faith, You're dismissing my criticisims (which are valid critiques of golang and the ecosystem of it) by hand waving them away. > I recognize that this does not perfectly map to your mental model, but why is this a major issue? The phrasing of this implies that it's my fault that go forces me to represent invalid states, not the languages. Here [0] is a 30 line (contrived for brevity) example showing something that is just not possible if you use C++'s std::optional, or Rust's Result types. > It's a bit like saying "that tire isn't perfect because it can pop, so lets use a metal tire instead". Sure, you fix one issue, but you create others. Actually I think it's more like saying "A metal band around a wheel is fine, why would we wrap them in rubber, that just causes more issues". > This is too vague to evaluate. There is a point at which repetition becomes a problem, and there is a point at which repetition is cheaper than having an abstraction. I don't think it can be evaluated in general. I disagree. Fundamentally the js ecosystem suffers from being too far the opposite (left-pad), and golang swings too far in the repitition direction. Here's some examples of really fundamental things that are missing from the language/libraries, that the response is "just write your own" [1][2][3][4][5] > If this is meant to be evidence that go is a bad language, I would disagree. The method of actually interacting with cgo is completely bespoke and novel, and unlike any other FFI system, without any advantages for doing so. It's fair and valid to criticise C++ for it's arcane build system, lack of package manager, lack of abi stability, and name mangling. It's fair to criticise js for it's over reliance on tiny packages, npm and all the extra compile steps it requires for an uncompiled language. It's fair to criticise rust for excruciatingly long build times, therefore it's fair to criticise go for it's half baked slow ffi IMO. [0] https://gcc.godbolt.org/z/eKWq6rnb7 [1] https://stackoverflow.com/questions/44940822 [2] https://stackoverflow.com/questions/21362950 [3] https://stackoverflow.com/questions/7782411 (no way to iterate through the container itself, only make a copy) [4] https://stackoverflow.com/questions/12518876 [5] https://stackoverflow.com/questions/19979178 |