You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The use of Bool should always indicate existence of certain attribute. A case for that would be checking if something is switched on or off. Another example would be to get information if certain value exists somewhere. In case of returning a success status, we should always return failure which gives more information about the error (different errors may have different exit codes). This is something that we're not consistent with in the Amber's standard library.
// Example of using boolean to return a statusletsuccess=foo()if!success{echo"Something went wrong :("}// Example of failing a function to return a statusletsuccess=foo()failed{echo"Failed with exit code: {status}"}
Describe the solution you'd like
Convert all functions that return Bool value as a status to a failable function equivalent.
Describe alternatives you've considered
N / A
Additional context
Standard Library
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The use of
Bool
should always indicate existence of certain attribute. A case for that would be checking if something is switched on or off. Another example would be to get information if certain value exists somewhere. In case of returning a success status, we should always return failure which gives more information about the error (different errors may have different exit codes). This is something that we're not consistent with in the Amber's standard library.Describe the solution you'd like
Convert all functions that return
Bool
value as a status to a failable function equivalent.Describe alternatives you've considered
N / A
Additional context
Standard Library
The text was updated successfully, but these errors were encountered: