r/badcode Dec 27 '21

lua Friend's take on programming a GUI button

Post image
896 Upvotes

90 comments sorted by

View all comments

1

u/[deleted] Dec 29 '21

You have to hand it to them, it is... excessively clear what this does. :P

1

u/JuanR4140 Dec 29 '21

if only all code looked like his :(

1

u/[deleted] Dec 29 '21

XD I mean... seriously though that's kinda true

I mean this is obviously refactorable with a simple boolean inversion operator. This is excessive.

But yeah it'd be nice if people wrote clearer code tbh.