Skip to content

MDL decision (split) syntax inconsistent #913

Description

@mkrouwel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions