why are undergrads in compsci so obsessed with switch statements

@wallhackio not an undergrad but purrsonally i just despise how if-elseif chains look

@aescling but switch statements add a bunch of indentation so for me it's picking your poison

@wallhackio @aescling In some languages (i.e. Ruby), cases are basically syntactic sugar for if/elses anyway. I do appreciate it generally making it easier to see "we're going to do a bunch of comparisons against one thing" though rather than needing to reverify predicates each time.

Follow

@aschmitz @aescling I like switch statements I just don't understand why undergrad cs students seem to think they're the pinnacle of software design

Everyone used else if at my old job and it was fine.

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.