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
What problem this addresses: The #1 problem with the language right now is the amount of code repetition when setting collection functions. If you have 15 collections with 5 functions each, and you add a new role to the access control, you'll have to manually change 15*5 = 75 lines.
This approach was inspired by SASS's mixin/include feature.
functionset Readable {
get @expose
getAll @expose
count @expose
}
functionset Writable {
insert @expose
remove @expose
}
collection Person {
properties {
name str
}
functions {
@include(Readable)
@include(Writable)
// @include(InvalidFunctionSet)
// ^ function set "InvalidFunctionSet" not found
}
}
// same as
collection Person {
properties {
name str
}
functions {
get @expose
getAll @expose
count @expose
insert @expose
remove @expose
}
}
What problem this addresses: The
#1
problem with the language right now is the amount of code repetition when setting collection functions. If you have 15 collections with 5 functions each, and you add a new role to the access control, you'll have to manually change 15*5 = 75 lines.This approach was inspired by SASS's mixin/include feature.
Both output:
The text was updated successfully, but these errors were encountered: