A boolean decision is turned into if-then-else
A enum decision is turned into:
case $enumvalue when _a then (...) when _b then (...) when (empty) then (...) end case
and an object type decision is turned into:
split type $anyobject case Module.EntityA (...) case Module.EntityB (...) else return; end split;
Suggestion is to stay closer to switch statement as in Java, TypeScript, etc. and use case for cases (not when, with right indentation!) and to not use case where switch/split is meant, and default/empty for final (all-catching) statement.
Suggestion for enum split:
switch $enumvalue case _a (...) case _b (...) default/empty (...) end switch;
Suggestion for object type split:
switch type $anyobject case Module.EntityA (...) case Module.EntityB (...) default/empty (...) end switch;
MxCli v0.18
A boolean decision is turned into if-then-else
A enum decision is turned into:
case $enumvalue when _a then (...) when _b then (...) when (empty) then (...) end caseand an object type decision is turned into:
split type $anyobject case Module.EntityA (...) case Module.EntityB (...) else return; end split;Suggestion is to stay closer to switch statement as in Java, TypeScript, etc. and use case for cases (not when, with right indentation!) and to not use case where switch/split is meant, and default/empty for final (all-catching) statement.
Suggestion for enum split:
switch $enumvalue case _a (...) case _b (...) default/empty (...) end switch;Suggestion for object type split:
switch type $anyobject case Module.EntityA (...) case Module.EntityB (...) default/empty (...) end switch;MxCli v0.18