Closed Almas-Ali closed 2 months ago
I think it would be better without the break
(maybe there would be a special fallthrough
keyword like in Jai) since forgetting it seems to be one of the most common mistakes devs make. This would also allow to break out of loops from within switch
statements, like:
while true {
cmd = input("> ")
switch cmd {
...
case "exit" {
break # The `break` in this case would break out of the loop
}
}
}
Ok. Proposal accepted. 👍🏻
With this proposal Radon will get a
Switch...Case...Default
statement syntax that developers loves.Example:
Without
default
type will also be valid type.break
statement will also be included with this to handle cases. Free fall will be supported here.This issue will be edited for any future enhancements until feature completed.