This really interesting proposal for an any
case in a switch
statement (with subtle differences from default
) by Meghan...
...got me thinking: what imaginary language features would be cool to program with? In response to Meghan's proposal I thought of a template case
:
What are some neat ideas you've had for language features?
What about a
template
case?template
could be applied to only a particular subset of cases, and thetemplate
definition could be extended to do exception handling, etc.