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

Go through annotations and see if some should be promoted to 1st class concept #214

Open
brice-morin opened this issue Mar 27, 2018 · 2 comments
Labels
language/Metamodel Question ThingML v3 To be considered in the next major release
Milestone

Comments

@brice-morin
Copy link
Collaborator

brice-morin commented Mar 27, 2018

Possible good candidates (feel free to add more):

  • @sync_send
  • @fork_thread
  • @type_checker
  • @abstract, which in this case should be deprecated, since this is now a concept
  • @c_header, which is quite similar to @java_import, dealing with package/namespace import that we find in most languages
  • @c_global, @java_features, which allows to add target code at the beginning of the class/structure/whatever for the thing. Might maybe be generalized?

Good candidates are in general annotations not specific to a given platform, which we already use in different contexts.

We'll create individual issues once we agree on the final list.

@brice-morin brice-morin added language/Metamodel Question ThingML v3 To be considered in the next major release labels Mar 27, 2018
@jakhog
Copy link

jakhog commented Mar 27, 2018

I don't know if I am supposed to put complaints here, but I have issues with the first two:

  • @sync_send. In some languages, we cant do this, e.g. Go. There is no way to do this safely (since they are running in separate goroutines).
  • @fork_thread. Some platforms don't have threads (like Arduino). So this wouldn't be that easy. And isn't this kind of why we have sessions?

@brice-morin
Copy link
Collaborator Author

Good points. @sync_send would also be a pain in Java.

For @fork_thread the idea is to allow for simple function-like listeners, which could be useful for external things. Like on entry you could call listenSerialPort, which somehow runs in a thread ("physically" or logically) and emits ThingML messages whenever somethings happens on the serial port. Doing that in a session is a bit overkill, as it forces us to have a statechart, etc when all we need is a function that runs in parallel of the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/Metamodel Question ThingML v3 To be considered in the next major release
Projects
None yet
Development

No branches or pull requests

2 participants