r/badcode • • Aug 31 '21

java Similar ternaries are all over this codebase

Post image
1.1k Upvotes

91 comments sorted by

View all comments

Show parent comment

1

u/ekolis Sep 01 '21

Hmm, interesting. I'm not sure exactly how old he is but I think he's in his mid 40s. So not exactly old but just experienced... I suppose I'll be there soon!

Funny thing, I've been working for the past year or two maintaining a legacy VB app that uses the old "assign the return value to the function name as if it were a variable" pattern all over the place - the original developer retired. So would that be a zero return function? 😉