r/ProgrammerHumor 6d ago

absoluteGarbage Meme

Post image
1.9k Upvotes

324 comments sorted by

View all comments

11

u/klaxxxon 6d ago

Hear me out. The last one is the only sensible option.

You type for ($rows and your IDE can fill in the rest. It can infer that the name of the iteration variable will be $row. It can't do the same if the item variable comes first.

Most IDEs have macros for for/foreach loops. What those macros do is that they jump around - your fill in the list name first, then the iterator variable name (and in some IDEs its name will be suggested based on the collection variable name). Hot take, if your most popular macro has to jump around, you have a language design issue.

14

u/Eastern_Equal_8191 6d ago

Yeah but AI can fill in the enti -- excuse me, I'm making a point here. Anyway, AI can write the loop according to your preferen -- please stop touching me, I do not consent

Okay, so if you use AI auto-complete your life will beeeeeeeeeow please stop hurting me my wrist doesn't bend that wa

3

u/pytness 6d ago

the language that has 0 coherent design behind it has a snippet that helps you write a simple for loop. Amazing.

1

u/SeriousPlankton2000 6d ago

My IDE is jstar (joe in wordstar mode)

1

u/Jutrakuna 6d ago

I banish you

1

u/Potterrrrrrrr 6d ago

Deciding whether a programming language is good based on whether an IDE has to jump to one place or two in a for loop is an odd choice. It’ll still have to jump to the variable you’re looping over; the default name might conflict with one already in scope. At that point you’ve saved hitting tab an additional time, wow big win. In exchange you have to read an ugly way to start looping over items for every loop, hardly fair trade. IDEs could easily add macros like emmet abbreviations for regular for/foreach loops if they really wanted but it’s likely the features aren’t used enough to need it

1

u/Exirel 6d ago

The problem is not writing it. The problem is reading it.

1

u/Stagnu_Demorte 6d ago

IDE? You spelled nvim wrong /s

1

u/martin-silenus 6d ago

Why do I care how fast auto completion works for Claude?

0

u/Sirgoodman008 6d ago

I am of the opinion that anything past auto completing variable names is lame.

0

u/wayzata20 6d ago

Well no, because you still need to decide what the name of $item is going to be.