I designed and implemented my own scripting language, which features a control flow structure I wanted to get some feedback on!
The `when` statement in DeltaScript extends the traditional `switch` statement with types of cases for pattern matching and testing the control variable against a boolean function (predicate). It also does away with fallthrough.
flinkerflitzer|1 year ago
The `when` statement in DeltaScript extends the traditional `switch` statement with types of cases for pattern matching and testing the control variable against a boolean function (predicate). It also does away with fallthrough.
Read about the semantics in detail: https://github.com/jbunke/deltascript/blob/master/docs/ls-5-... Download the entire language specification and/or play with the Java interpreter: https://github.com/jbunke/deltascript/releases/tag/v0.1.0