Re:Go Developer Survey 2022 Q2 Results
by mekster on Thursday September 08, 2022 @02:35PM
(#32769960)
If the called function only returns a specific type, how is there a need to type check the returning value?
[ Parent
| on HN ]
Re:Go Developer Survey 2022 Q2 Results
by randomdata on Thursday September 08, 2022 @03:19PM
(#32770653)
Thrown errors are always of type unknown, so you have to assert them back into a known type.
Or throw caution to the wind and arbitrarily cast them to a type of your choosing, but that never ends well. A robust and maintainable system can’t reasonably do that.