Hacker News new | past | comments | ask | show | jobs | submit login

> How are you thinking of solving this with generics?

People can now create Try or Option monads instead of returning the error.

This was the one of the reasons anti generics people were anti generics




But that will make error handling more verbose.


Speaking as a user of languages that have exactly this, it can’t possibly be any worse than the situation in Go right now.


Other languages have an additional zoo of language syntax besides generics to make monadic error handling bearable, which Go doesn't have.


It'll make it unmanageable by hiding complexity.

But more verbose? I'm not so sure.


Passing a single anonymous function is already more characters to type than if err != nil {}.


Will it?

I can't see it myself, but happy to educate myself.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: