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
Prompted by an issue raised in the SM Commons, I took a second look at the creation commands and realized that the asynchronous and synchronous creation was ambiguous.
The ambiguous asynchronous creation command was:
Create -> *Folder()
But this could be interpreted as a normal signal to a synchronously created instance:
new folder .= *Folder()
Create -> new folder
Which, after removing the temporary variable reduces to this:
Create -> *Folder() // Create folder instance synchronously and then send event to it!
So now we specify asynchronous creation with a new symbol like this:
Create *> Folder()
I could have gotten away with:
Create -> Folder()
Here we have a signal directed at a class. (We know it is a class since, if the class model defines a class named Folder it takes priority over any variable. Also, there must be a creation event named 'Create' defined on that class. But that might not be immediately clear to someone reading the action language, so the *> symbol makes it immediately clear that asynchronous creation is happening.
I also added syntax to create multiple instances synchronously. See the relevant section on asynchronous creation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Prompted by an issue raised in the SM Commons, I took a second look at the creation commands and realized that the asynchronous and synchronous creation was ambiguous.
The ambiguous asynchronous creation command was:
But this could be interpreted as a normal signal to a synchronously created instance:
Which, after removing the temporary variable reduces to this:
So now we specify asynchronous creation with a new symbol like this:
I could have gotten away with:
Here we have a signal directed at a class. (We know it is a class since, if the class model defines a class named
Folder
it takes priority over any variable. Also, there must be a creation event named 'Create' defined on that class. But that might not be immediately clear to someone reading the action language, so the*>
symbol makes it immediately clear that asynchronous creation is happening.I also added syntax to create multiple instances synchronously. See the relevant section on asynchronous creation.
Beta Was this translation helpful? Give feedback.
All reactions