Open
Description
We should add a new special kind of function as an allowed expression, being using (numeric) indices to access elements of an array or list.
Since we want to support this on the generic TESTed type sequence
, we must consider the following cases:
- How would we track the type of the array/list? For example, in Java, depending if the sequence is an
array
or alist
, the syntax is different. Since we don't track the types of variables, we could work with helper functions, that use the correct notation at runtime. - The Python syntax (e.g.
this_is_a_list[0]
) can be used in the DSL. However, how would we differentiate array element access and dictionaries with numeric keys? See Support value access for dictionaries/maps #324.