TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
102 stars 32 forks source link

List of features #160

Open brice-morin opened 7 years ago

brice-morin commented 7 years ago
jakhog commented 7 years ago

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 commented 7 years ago

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

ffleurey commented 7 years ago

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