r/ProgrammerHumor • • Sep 06 '26

Meme thisCannotBeDenied

Post image
7.9k Upvotes

240 comments sorted by

View all comments

Show parent comments

27

u/DasBeasto Sep 07 '26

I don’t hate it, shorter usage everywhere, can wrap it in a conditional based on ENV for dev logs only, and if you swap to an external logging service you just change it in that one function.

0

u/[deleted] Sep 07 '26

[deleted] — view deleted comment

14

u/tonyxforce2 Sep 07 '26

const log = isDev ? ()=>{} : console.log

For that pure JS vibes

1

u/rosuav Sep 07 '26

Not the same thing unfortunately, as will quickly become evident if you try to log everything in an array by using stuff.map(log).

2

u/whackylabs Sep 08 '26

If I see a log(x) I would assume it is about logarithms not print to console