Re:Go 1.19 Beta 1 is released
by fileeditview on Saturday June 11, 2022 @05:22AM
(#31703133)
TBH 1,3 and 4 of your arguments are just subjective. You are used to something different and not willing to learn this way or dislike the appearance..
For 2 you can see it that way. Or you are glad there are no exceptions and prefer the explicitness of error handling in Go. So in the end it's also subjective I guess.
I remember when I first looked at Go ~7-8 years ago I also didn't like the syntax. However it grew on me and now I like it. Opinions change. These days I try to not instantly judge something on my initial feelings.
> 2) No try/catch. Inexcusable in my opinion.
You won't like Rust either then. Though its just a matter of time till Rust gets try-catch too. It's slowly moving towards that step by step. Folks have already made crates https://docs.rs/try-catch/latest/try_catch/
Re:Go 1.19 Beta 1 is released
by tragomaskhalos on Saturday June 11, 2022 @05:08AM
(#31703066)
That crate seems to desugar to regular Rust style error handling, ie with Result<>s and ? operators. But I would imagine strong community push-back against any movement towards genuine stack unwind style exception handling in Rust beyond the current panic handling mechanism.
I haven't tried Rust out yet, but the syntax doesn't look appealing. However from what I've seen of the stdlib, it seems to make up for it. If Go had a better stdlib I could probably forgive some syntax problems. But having large gaps in both is very frustrating.
It is at least excusable in case of a low-level language meant in part for embedded/kernel development, etc.
Re:Go 1.19 Beta 1 is released
by 8n4vidtmkvmk on Saturday June 11, 2022 @05:02AM
(#31703036)
my work has banned exceptions in c++ and i kinda love it. i know exactly which functions can fail now and you're forced to handle all errors.
2) No try/catch. Inexcusable in my opinion.
3) The syntax for declaring maps/arrays looks gross. Again, being different for the sake of it.
4) No while loops. The for loop syntax is not too bad, but I think this was again a choice made out of trying to simplify things when not a single person ever complained that "Java/C has too many types of loops".
I could go on, but in general my opinion is that Go deviated from some good established norms for no good reason, and this makes it much harder to adopt. It also isn't fun when you have a code base with e.g. Go and Java or Go and C# mixed in. The mental overhead of having an entirely different syntax to reason about is frustrating. And for what benefit? At least list comprehensions in Python are nice to read. I can't think of anything that is nice to read in Go.