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
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
The text was updated successfully, but these errors were encountered:
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.
while
loop (typically not incrementing the index)The text was updated successfully, but these errors were encountered: