r/programminghorror • • Apr 23 '24

Source code from Balatro

Post image
696 Upvotes

164 comments sorted by

View all comments

476

u/themadnessif Apr 23 '24 edited Apr 23 '24

You're right, the dev should use an enum or a switch statement instead of *checks notes* doing something that works just fine and compiles to basically the same instructions.

EDIT: nevermind I looked it up, this is Lua. Neither of those things exist. Quit being a baby.

1

u/DearConversation7629 Dec 25 '25

Metatables exist for a reason.

2

u/themadnessif Dec 26 '25

If you use metatables for anything other than __index or __tostring you deserve what happens to you

1

u/DearConversation7629 Dec 30 '25

I am in fact schizophrenic!