DEV Community

Discussion on: Language Proposal: The 'Any' Switch Case

Collapse
 
megazear7 profile image
megazear7

I think it would just have to just be specified by the language. I'm not coming up with anything that wouldn't add a bunch of lexical complexity.

This does remind me though, when you have increasingly complex relationships between data and behavior, at some point it's best to abstract that into it's own class that can encapsulate that logic so that the language doesn't have to make increasingly strong opinions on how those relationships are expressed.