abandon icon indicating copy to clipboard operation
abandon copied to clipboard

Ability to define maps or switch-case statements

Open hrj opened this issue 9 years ago • 0 comments

It should be possible to define maps.

Tentative syntax:

define myMap = {
  0 : 123,
  "name" : 456,
  2013/may/1 : "value"
}

Alternatively, add ability to define switch case statements. Then special map support is not required; functions can be written to achieve the same result:

define myMap(index) = switch(index) {
  0 : 123,
  "name" : 456,
  2013/may/1 : "value"
}

The switch-case concept is more powerful, hence I would prefer that.

hrj avatar Sep 08 '16 06:09 hrj