Re:Declined Proposal: A built-in Go error check function, “try”
by bmurphy1976 on Tuesday July 16, 2019 @09:29PM
(#20455607)
But it doesn't simplify, it just moves the complexity around. That's not necessarily bad, you get better safety guarantees as a result but you also spend more time fighting the compiler and locked in design space trying to get a model that works (and even MORE time is spent if you want it to be readable and something that other people can grok quickly).
I don't see this as an either/or situation. There's a continuum between do whatever the hell you want C and rigorously defined Idris code. Picking a spot on that line involves many trade-offs and everybody has to choose what's right for their situation. That means Go approach is sometimes superior to the Scala approach for a certain class of problems in certain domains.
Edit: don't downvote me, tell me how I'm wrong.
Re:Declined Proposal: A built-in Go error check function, “try”
by UK-AL on Tuesday July 16, 2019 @09:45PM
(#20455689)
Honestly I think moving to towards Idris/coq level type systems saves more time in the long run.
Being close c means you discover errors at run time, then you have to come back to cover them.
Re:Declined Proposal: A built-in Go error check function, “try”
by bmurphy1976 on Tuesday July 16, 2019 @09:51PM
(#20455717)
For humongous projects or critically important ones I'd agree with you, but for smaller/mid sized projects I can't agree. I think it's total overkill in many instances.
Would be nice if there was a language that scaled from C to Idris gracefully, but C++ and Scala make me think that's a pipe dream.
Though with generics we could have the error values be less invasive. Learning the Scala mindset was eye opening. For e.g. the design patterns of an Optional[T]’s primary code flow are the same as a Try[T,E].
With common transformation idioms, you learn to recognize code patterns the same way one might recognize data structures. It’s no less magical and it simplifies greatly.