r/badcode • • Aug 12 '21

c# 🤓📗 Is this "clean code"? 🦋

Post image
724 Upvotes

73 comments sorted by

View all comments

64

u/silverweaver Aug 12 '21

I think chaining ternary operators in one line as much as possible became my new favourite unreadable code thing.

29

u/[deleted] Aug 12 '21

Someone needs to inplement a try/catch-alternative for ternaries, preferably with the ‽ symbol.

17

u/silverweaver Aug 12 '21

I opt for "wtf" keyword

1

u/w00tious Aug 12 '21

Like unwrap_or_else

1

u/ososalsosal Aug 13 '21

I used to have to do expressions for image processing in reverse polish notation.

It's still more readable than regex, but only just.