Skip to content
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

Support Type Guard on Maybe Types #113

Open
Alexius-Huang opened this issue Jun 8, 2020 · 1 comment
Open

Support Type Guard on Maybe Types #113

Alexius-Huang opened this issue Jun 8, 2020 · 1 comment

Comments

@Alexius-Huang
Copy link
Owner

Alexius-Huang commented Jun 8, 2020

What?
Type guard for maybe types.

Why?
Currently maybe types data cannot be used anywhere except assign it to another maybe type variable.

How?
Sample Wyrd Code

mutable maybe Num foo = 123

Num bar = if foo != Null => foo + 456
          else => 789

Compiled Result

const foo = 123;
const bar = foo !== null ? foo + 456 : 789;
@Alexius-Huang
Copy link
Owner Author

Blocked by bug #111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant