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
//if this object wasn't previously set this would set it
@object ? name { … }
@value example { keywordA }
@value example2 { … }
& ? example { keywordB }
//this would use keywordA since example was already set
property: example;
It's quite useful when you rely on third party hss.
alternate proposal
Since we can't start an object name wth a ? we could either get rid of the space or make it optional.
@object ?name { … }
concequense
//since
#new name { … }
//is equivalent to
#new @container name { … }
//then
#new ? name { … }
//is equivalent to
#new @container ? name { … }
Which means that the ? will be scope aware when used with the new instruction and that this construct will replace the ensure instruction.
//example with several elements
#new @container elementA & ? elementB { … }
//is equivalent to
#new elementA & ? elementB { … }
//should we allow
?@object nameA & nameB { … }
//to resolve to
@object ? nameA & ? nameB { … }
//which would mean we would also have to accept
!#support (A) & (B) { }
//which would be equivalent to
#support !(A) & !(B) { }
The text was updated successfully, but these errors were encountered:
Coffeescript has the existential operator and Roole has the conditional assignment operator ?=.
It's also pretty useful to set a default fallback placed after in the source. So for example if an user chose not to do something we would have a default dynamically set afterwards.
It's quite useful when you rely on third party hss.
alternate proposal
Since we can't start an object name wth a
?
we could either get rid of the space or make it optional.concequense
Which means that the ? will be scope aware when used with the new instruction and that this construct will replace the ensure instruction.
PS: depends on axr/core#190
Question
The text was updated successfully, but these errors were encountered: