DEV Community

Discussion on: Type-Safety, it's pretty nice

Collapse
 
xanderyzwich profile image
Corey McCarty

There are tricks for playing boolean-y stuff in reserved values. Like you can return "-". It would actually help more to return a string and for that negative case throw an exception and handle it explicitly on the calling code.