switch is not ‘side-effecty’. It has 0 side effects apart from whatever you cause. Agreed that it won’t compose well, though. The main issue with
switch is that it’s a block rather than an expression.
The main annoyances about
switch being a block, other than not being composable, are that