You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of switch statements doesn't really support the ability to break out of it.
Describe the solution you'd like
I'm not really sure how this could be achieved, perhaps by treating the switch statement like a loop?
Describe alternatives you've considered
Similar behaviour could still be achieved by putting the switch statement in a function and just do a return, but it would still be nice to have this other possibility for breaking out of a switch statement.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hey! Sorry it took me so long to respond to this. I'm actually unsure how I feel about switch statements altogether if I'm being perfectly honest. There are other ways to achieve the same output without using the switch statement. Something to think about going forward with Dictu if I'm honest, we could remove them entirely and try to opt for something a little more powerful with match statements (although this may need some compiler re-jig as .match is used a bit for dealing with Result types).
Definitely a valid gripe if we are to keep switch statements in the language however!
Is there an existing issue for this?
Is your feature request related to a problem?
The current implementation of switch statements doesn't really support the ability to
break
out of it.Describe the solution you'd like
I'm not really sure how this could be achieved, perhaps by treating the switch statement like a loop?
Describe alternatives you've considered
Similar behaviour could still be achieved by putting the switch statement in a function and just do a
return
, but it would still be nice to have this other possibility for breaking out of a switch statement.Additional context
No response
The text was updated successfully, but these errors were encountered: