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 default value for all types and 'default' operator #15

Closed
tmteam opened this issue Jan 10, 2022 · 0 comments
Closed

Support default value for all types and 'default' operator #15

tmteam opened this issue Jan 10, 2022 · 0 comments
Assignees

Comments

@tmteam
Copy link
Owner

tmteam commented Jan 10, 2022

every type has it's default value

f(a,b) = 
   if (a>b) a
   if (b>a) b
   else default
default(any) = none # depends on nullability support.
default(int) = 0
default(real) = 0.0
default(bool) = false
default(text) = ""
default( array of t) = [ ]
default {field1, field 2} = { field1 = default, field2 = default}
default rule(T,T):R =    rule(T,T):R = default
@tmteam tmteam changed the title 'default' support Support default value for all types and 'default' operator Jan 18, 2022
@tmteam tmteam self-assigned this Jan 22, 2022
tmteam added a commit that referenced this issue Jan 22, 2022
@tmteam tmteam closed this as completed Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant