4 ms·
I used to be very anti-Go, but I am coming to like it, especially the projects built with it. Nice work!
by djaouen 3y ago
I used to be very anti-Go, but I am coming to like it, especially the projects built with it. Nice work!
- seanw444 3y agoHow can one be anti-Go? It's a solid, fairly resource unintensive language.
- 3836293648 3y agoZero abstractability, extremely imperative. It's very good at what it's for, but it's absolutely terrible for anyone who prefers a declarative or even functional style
- DSingularity 3y agoIs there an advantage to language designed to mix the styles?
- gonzo41 3y agoPython, Java and C++ do attempt to support all styles to varying degree's. Some of those languages have had varying success. :P
- Zambyte 3y agoThe tradeoff is being able to decide how your project should be organized rather than someone else deciding for you. Sometimes you want that, sometimes you don't. The advantage of mixing paradigms in a single technology is the ability to switch / decide on paradigms without switching technologies.
- ForHackernews 3y agoI dislike Go. It's almost anti-expressive. It's fine if you want a dull language that your junior devs will find hard to shoot themselves in the foot with. It's like a safer C.
- xandrius 3y agoRemove the word "junior" and that's totally my opinion and why I absolutely adore it. I can write a program while drunk or high and I know that I'll get 99% there, on the other hand python, js and C++ let me write basically whatever and it even let me run it.
- deleted 3y ago[deleted]
- illusive4080 3y agoIt’s too simple and refuses to offer any sort of syntactical sugar. Error handling requires lots of boilerplate. No enumerations. Etc etc.
- randomdata 3y ago> No enumerations. Of course it has enumerations. It has had them from the get-go. After all, enums are a workaround to help deal with the shortcomings of a basic type system. You're bound to find them anywhere you find a basic type system, which certainly describes Go. In fairness, there does seem to be some confusion floating around about the difference between enums and sum types, with some mistakenly calling sum types enums. Indeed, Go does not have sum types. This is what languages with more advanced type systems are bound to provide instead. Enums are pointless when you have a more expressive type system. > Error handling requires lots of boilerplate. What patterns are you seeing in other languages when it comes to error handling without the boilerplate? Certainly there are other languages that provide shortcuts when not handling errors, but that's something else entirely.
- illusive4080 3y agoThe iota trick is not an actual enumeration as traditionally defined. If err != nil after every fallible function call pales in comparison to being able to choose your own error handling such as automatic bubbling or wrapping that you can do in other languages. Go gives you two options: explicit handle or implicit ignore. There is no other option. The if statements clog up code unnecessarily. Rust does a great job of error handling, but I’d argue that almost every other language including Java does errors better than Go.
- illusive4080 3y agoExplanation for enumeration: the thing about enumeration is you can ensure that you do an exhaustive handling of all cases in a switch statement. If an enum changes in a future library version you can get a compile error wherever the enum is enumerated in code which helps you handle new cases due to new features in a library. Go can’t do that.
- LispSporks22 3y agoToo much typing ‘if err..’ everywhere