-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rethinking failable types #478
Comments
I was also thinking about it. Also what about actually failable types? We could implement Rust's
I got stuck with the Bash implementation for it as Sh does not support arrays and Bash nested arrays. |
i think we could implement |
so far i see we have the following options:
|
come to think of it, do we even need the modifiers? it could be set automatically if a function has a |
or use the compiler flags:
|
preface
i feel like the way failables are implemented right now is completely wrong and we have to start over.
lets say that we have
$curl something.com$
. it returns aText
, right? and its not the data that is failable, but the eval block itself.so right now we have failable types that are only usable in function declarations:
but imo types have nothing to do with failability. even when called, the function has to have a failed block right away and its not possible to unwrap that type later as you would do with a
Result
in rust.like if i call it like this
the compiler will say "The failed expression must be followed by a block or statement". an expression. not a type
what i want to do with it
remove the failable type, and add a
failable
function modifier instead:the same way as the
pub
modifier worksThe text was updated successfully, but these errors were encountered: