It seems like this at first glance, but it will be useful when the use of trycatch becomes repetitive, and these functions allow you to always reuse them.
My point was — If a whole modern language, which is known as an easy-to-read language, uses a pattern like that as standard good practice maybe the pattern is not that over-engineered
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is over-engineered to me
It seems like this at first glance, but it will be useful when the use of
trycatch
becomes repetitive, and these functions allow you to always reuse them.Actually, this error tuple-pattern is very common in Go.
In terms of error handling, my favorite is rust because it has less overhead. But it's uglier and a little bit more complicated.
Yes, I am a gopher, but do you think over 50% JavaScript developer using Go?
No! Of course not lol.
My point was — If a whole modern language, which is known as an easy-to-read language, uses a pattern like that as standard good practice maybe the pattern is not that over-engineered