5 ms·
>So what you're saying is that the fundamental core of Java, Scala, Clojure are anti-patterns ? That's a strong statement for a platform that almost every enter
by dscrd 12y ago
>So what you're saying is that the fundamental core of Java, Scala, Clojure are anti-patterns ? That's a strong statement for a platform that almost every enterprise application uses.
Just so. You think something being used in enterprise is a worthy argument?
- frowaway001 12y agoIt's sadly much too common to abuse exceptions for non-exceptional situations. That doesn't mean Go's "error handling" is any better. It's probably the worst approach one can pick. (But this has been discussed dozens of times already and Go fans have decided that they don't want to hear it.)
- NateDad 12y agoSaying exceptions are for exceptional situations is an old fallacy (one I used to believe in). Exceptions are errors. Errors happen all the time. They are not exceptional.
- WorldWideWayne 12y agoSure they are. Just because something happens all the time doesn't mean that it's not exceptional. Banks get robbed all the time, but that's still the exception to the rule that people usually go to the bank for normal business. At the "Bank of Golang" though - they've made every customer get strip searched on their way in because of something that happens 1% of the time. No thanks. I'd rather go across the street where they simply have some cameras and security guards watching the crowd for exceptional behavior.
- frowaway001 12y agoThat's utter non-sense. There is slight difference between "the database is on fire" and "a user with user id 42 couldn't be found in the database", don't you think? Go handles neither of these situations gracefully.
- vardump 12y agoLet me guess, it logs something somewhere that no one ever checks? Or equally likely, you'll find this: void SomeHighLevelMethod() { ... catch (const DatabaseOnFireException& e) { // TODO log something here // TODO do something here } ... }
- dscrd 12y ago>It's probably the worst approach one can pick. (But this has been discussed dozens of times already and Go fans have decided that they don't want to hear it.) Rust and Swift designers picked a similar approach. Is it possible that three separate designers of languages are so bound by language trends that they decided to make the almost exact same mistakes?
- frowaway001 12y agoNo, they didn't. Go's approach is wrong, Rust's and Swift's are right.