3 ms·
I would be all over Go with a better type system or exceptions.
by solumunus 2y ago
I would be all over Go with a better type system or exceptions.
- deleted 2y ago[deleted]
- gf000 2y agoC#, OCaml, Java, Scala, Kotlin all fulfill these requirements, while targeting the same niche.
- solumunus 2y agoYes there are indeed lots of languages in existence.
- LinXitoW 2y agoGo has insanely good tooling and very fast single binary compiling. While all these languages (afaik) can reach similar levels of functionality (GraalVM e.g.), it's more work. As much as I hate the language Go, I can't deny how braindead simple it is to just make a tool with it. I don't need to choose a build tool, or a runtime version, there's a library for everything and most developers with more than a room temp IQ can immediately start working on it. The only other language that currently comes close is Rust. If only they had stuck to using a GC, I'd be in heaven.
- Capricorn2481 2y agoIs this that different from languages like Dotnet? I think one line in your config can make it Aot compiled.
- thiht 2y agoIf Go ever adds exceptions[1] as an error handling mechanism, I'm out. Value errors are far superior to exceptions, even in their current state in Go. [1]: assuming panics are not an error handling mechanism but a recovery mechanism
- solumunus 2y agoMadness.
- jdbxhdd 2y agoPanics can be values and errors don't have to be values in go? I think you are missing up concepts here
- thiht 2y agoI’m not talking about the underlying model, I’m talking about the control flow. What I mean is errors are explicit values belonging to the signature of the functions.
- LinXitoW 2y agoChecked Exceptions are nothing but errors as values with some syntactic sugar for the most common use case (bubbling up the error). Gos version of value errors is just micrometers ahead of C style error codes. In both cases you get told "there could be an error", the error is a value of one single type (error/int), and you have to manually find out which different errors this value could represent. If you want to know what you're missing, check out Rusts error handling.
- thiht 2y agoI love Rust error handling and wish it would have been the default in Go (too late to shoehorn it), but it has nothing to do with exceptions.