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

List of features #160

Open
4 of 10 tasks
brice-morin opened this issue Feb 17, 2017 · 3 comments
Open
4 of 10 tasks

List of features #160

brice-morin opened this issue Feb 17, 2017 · 3 comments
Assignees

Comments

@brice-morin
Copy link
Collaborator

brice-morin commented Feb 17, 2017

  • Abstract functions so as we can have PIM statecharts and just implement functions in a PSM thing
  • external things to replace protocols. Things can define ports and properties and be instantiated many times
  • Byte/Bit operations
  • composite types (struct like) packed (array) and not packed (memory-aligned)
  • Prevent a thing from including two statecharts
  • for each loop for arrays (maybe two types: to iterate over elements and to iterate over indexes). The rationale is to avoid common bugs when iterating through arrays in a while loop (typically not incrementing the index)
  • dafault/basics datatypes
  • Time/Timers directly in the language. The rationale is that almost everyone uses timers, either through protocols or through things, and it would be good to have a unified way of dealing with time directly in ThingML (e.g. as asked by @oysteinh)
  • CEP
  • switch/case, which can simplify long series of if/else if
@jakhog
Copy link

jakhog commented Feb 17, 2017

Some thoughts about for each loops

It would be nice to have two different syntaxes if you want to loop over the variable or the indices, like:

foreach ( value in array ) do
   ...
end

(the type of the value is given by the type of the array) and:

foreach ( index i : Integer in array ) do
   ...
end

And maybe break/continue in both foreach and while loops :)


Brice:
Or a combined one:

for index, value in array do
   ...
end

The compilers could make some optimizations if we only use index or value.


Jakob:
Yes, a combined one also makes sense. But I guess it should be required to specify the type of the index so that the compiler doesn't need to guess. And I also like the idea of using an index keyword (and possibly value as well) so that it is clear what is the value and what is the index.

@skorsky
Copy link

skorsky commented Feb 20, 2017

CEP as a feature: does this mean based on ReactiveX or in connection with Apama? What are the plans for a feature?

@ffleurey
Copy link
Collaborator

This is more a a meta-issue and whould be broken down in individual feature requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants