News for hackers. Stuff that matters.
Re:Error stack traces in Go with x/xerror by ttymck on Monday August 23, 2021 @10:35PM (#28284552)
No, not really, it's an accurate summation of where the pattern is commonly found. ADTs, like Rust's Enum, enable this kind of error handling, and are made more ergonomic with monad behaviors.

Scala's Either[A, B] is another example.

Re:Error stack traces in Go with x/xerror by scns on Tuesday August 24, 2021 @02:58AM (#28285858)
Yes, but Haskells'/Scalas' Either is abstract while Rusts' Result is specific SFBAP (Sorry For Being A Pedant).
Re:Error stack traces in Go with x/xerror by ttymck on Tuesday August 24, 2021 @01:47PM (#28292446)
Can you clarify the distinction between "abstract" and "specific"?

Is Scala's Try[A] "specific"?

Re:Error stack traces in Go with x/xerror by scns on Wednesday August 25, 2021 @04:17PM (#28306380)
Sure. Result is specific, you get a value or an error. Either can be used the same way, but you don't have to. The convention is use Right for the value and Left for the error but you can use it in other ways too, eg Left for an Int and Right for a Float.