r/programminghorror • • Aug 28 '26

Javascript Seriously? Recursive Regex?

Post image
566 Upvotes

46 comments sorted by

View all comments

Show parent comment

1

u/Square_Bad1781 Sep 01 '26

depends. if it is just a Poc for example and they maybe plan to use this variable more than once in the future, defining it as const directly wiuld be right imo. i also really like to do this kind of stuff in long functions (which this one isn't really) just to not have to go look for the things i want to change or tweak if i should have to do that in the future.

1

u/werdebud Sep 02 '26

But why people don’t use names instead of cryptic one chars? Is this meant to be running in a 32mb of ram system so we are cutting edges in number of chars typed?

1

u/Square_Bad1781 Sep 02 '26

idk. i hate stuff like this myself. thats a whole other topic than const variables for one time use tho

1

u/lonkamikaze Sep 16 '26

You really didn't have to cut any more corners once you had access to 32 MB RAM.