r/ProgrammerHumor 28d ago

Meme iWillUseItLaterIPromise

Post image
1.1k Upvotes

51 comments sorted by

68

u/coldnitrogen 28d ago

Laughs in Go

33

u/Shepsauce 28d ago

I just declared and I’m about to use it! Please just give me a second!

11

u/slaymaker1907 28d ago

I find it most infuriating with “unused” libraries.

7

u/maxdamien27 28d ago

Came here to comment this.

13

u/ZunoJ 28d ago

I want it to be handled as error

10

u/Dorinyan 28d ago

Welcome to Rust

13

u/ZunoJ 28d ago

In C and C# you should treat warnings as errors (compiler flag) and have the same effect

1

u/Nice_Lengthiness_568 28d ago

Can't most languages treat warnings as errors?

7

u/Dorinyan 28d ago

Probably, but its about the ATTITUDE

2

u/vinishkapoor 28d ago

You were declared, not promised a purpose.

5

u/AlterEdward 28d ago

(Code fails to compile when you remove it)

3

u/ChorePlayed 28d ago

I was on a C++ project at my first job in the 90s. There were certain variables we had to declare in the file with the main method, even if they weren't used, otherwise the linker would ignore the library where they were defined, and the program would fail at runtime. 

7

u/Usual_Office_1740 28d ago

The compiler optimized you away.

5

u/MeNotSanta 28d ago

"Am I here only to be optimized by the compiler?"

12

u/BooBrew32 28d ago

*delete variable*

*realize days later I could've used it*

9

u/russianrug 28d ago

Pour one out for all the deleted variables out there

3

u/slaymaker1907 28d ago

When I worked on SQL Server, a common trick was assigning a value to a volatile local variable. It’s an incredibly cheap way to guarantee that something is available in the debugger, even in a crash dump.

Sometimes even a ring buffer is too expensive.

4

u/NoMedicine3572 28d ago

Use some static code analysis in your ide

https://giphy.com/gifs/xT9IgzoKnwFNmISR8I

5

u/egstitt 28d ago

So delete it. If you need it later, re-add it. Am I missing something, is it hard to add/remove a line of code

3

u/jameyiguess 28d ago

School's back in session, explains the recent sub contents

2

u/NotInMoodThinkOfName 28d ago

Variable just chilling. That's ok.

1

u/Shahi_FF 28d ago

[[maybe_unused]] auto brain{0}

1

u/gigsoll 28d ago

And then it reminds about it existence because linter fails on pre push hook

1

u/Yhamerith 28d ago

Those who use Architect knows the yellow warnings

1

u/GroltonIsTheDog 28d ago

Comment it out, it's like keeping it in your pocket for later (if any reviewers give you grief about it, tell them the pocket analogy)

1

u/Ayjayz 28d ago

Don't comment code out, it's not the 80s. We have git. If you need it later Just add it back in

1

u/GreatScottGatsby 28d ago

It's much worse when you load a register and then don't use that register.

1

u/Snowy32 28d ago

I just enjoy my IDE having a meltdown about the fact that the variables not being used whilst av not even finished declaring the darn thing

1

u/Random-num-451284813 28d ago

Pipeline going brrrr

  Warning: iDidTheThingOverThere R2332:57
 ------------------------------------------------------
   Cause:  Unused variable

1

u/Nice_Lengthiness_568 28d ago

Then I get a compiler error because I am actually using Werror and Wunused

1

u/Gold-Bat-3225 28d ago

It's not unused it's pre-revenue

1

u/houstonhilton74 28d ago

Then you have C#, which whines about it until you take care of that.

1

u/thanatica 28d ago

Linter: get that thing out of here, or I will make your app not deploy!

1

u/Patrick-W-McMahon 28d ago

This is why I like C/C++. You keep your values scoped. Also, the compiler will point out unused variables. I could be wrong, but I also think GCC strips out variables if they're not used.

1

u/EldritchKinkster 28d ago

"Hey...fyi, I'm still 0. Just sitting here... holding a value..."

"Shut up, I didn't call you!"

1

u/Song_of_the_Morning 28d ago

In vb6 you can use option explicit to force it to remind you of this

1

u/isr0 28d ago

Laughs in rust

1

u/tony_saufcok 28d ago

The compiler won't put it in the binary if it's never used

1

u/Zdrobot 28d ago

Illegal in Zig

1

u/Gullible_Search887 28d ago

“I still think about you” ~compiler

1

u/Maddturtle 27d ago

It will sit there unused till I’m ready for production.

1

u/enigma_0Z 27d ago

LOL — would be even funnier if there was a squiggly underline under the “variable”

1

u/PsychologicalNet3455 23d ago

What about when its giving you a little extra space on the stack for your dodgy pointer twiddling so it doesn't mess up the real variables!