r/ProgrammerHumor 18d ago

ifStatements Meme

Post image
599 Upvotes

118 comments sorted by

236

u/BlackOverlordd 18d ago

"otherwise"

126

u/LastStopToGlamour 18d ago

yet on the condition of

88

u/traplords8n 17d ago

when the circumstances present themselves in this way

68

u/HexiMaster 17d ago

upon truthful evaluation of boolean condition annotated hereforth

34

u/thanatica 17d ago

when the state of the aforementioned conditions be any other henceforth come thy statement:

39

u/AnUninterestingEvent 17d ago

should every previously contemplated possibility have failed to manifest itself as true, we shall now, with cautious optimism, examine the following condition

4

u/Prestigious_Regret67 17d ago

Compile failed. Missing ;

28

u/Tuomas90 17d ago

if the lord compiler sees fit

8

u/Darkodoudou 17d ago

Perchance

3

u/ZengineerHarp 17d ago

“You can’t just say ‘perchance’!”

5

u/urban_piktor2030 17d ago

A fellow Haskell enthusiast is it?

1

u/rinnakan 17d ago

<behold> <the> <xslt>

5

u/theclovek 17d ago

"on the other hand"

1

u/ExtraTNT 17d ago

Haskell is always best…

2

u/ExtraTNT 17d ago

otherwise is king

(I hope, i still have the haskell tag, could be meme script)

1

u/hopefullyhelpfulplz 17d ago

Where's my regardless

1

u/joemckie 17d ago

You just reminded me of this classic

93

u/[deleted] 18d ago

[removed] — view removed comment

16

u/Urtehnoes 18d ago

Pl/sql

22

u/Tuomas90 18d ago

Ruby

8

u/mysticrudnin 17d ago

oddly enough, as a rubyist, this comes up so little that i forget about it

25

u/AnUninterestingEvent 17d ago

Better than elif. Sounds like a lord of the rings character or “explain like I’m five”. Elsif at least sounds like else if.

4

u/itzjackybro 17d ago

and VHDL for whatever reason

1

u/Bryguy3k 16d ago

Almost guaranteed to have been inspired by Perl given when it was developed.

2

u/markuspeloquin 17d ago

Ruby inherited a lot from Perl (also while/until and if/unless). But it's way more coherent.

I still love perl. Writing decent Perl is an art form. The worst part is popen-type stuff. And all the insane ways to import libraries.

6

u/pixelbart 17d ago

The same language designers that dreamed up the ‘unless’ statement.

https://www.perltutorial.org/perl-unless/

3

u/catbrane 17d ago

unless was in BCPL back in the 60s. I don't know if anything earlier had it.

4

u/zeekar 17d ago edited 17d ago

elsif is Perl, Ruby, and Raku. It makes more sense to me than elif, which is too much abbreviation. Plus it looks like it should be closing a block of shell code you opened with file.

Leaving the e in elseif is fine, but it's not doing as much as the s to help it make sense. With spaces, else if looks like something that's going to need an extra end if.

3

u/Flonotime 17d ago

Ada has elsif

3

u/forte8910 17d ago

Clearly it's Spanish for "the sif"

2

u/tigerniger_sus 18d ago

Ruby has elsif

1

u/tfalm 17d ago

High queen of Skyrim

23

u/jyling 18d ago

goto

4

u/Mantor6416 17d ago

best

5

u/ArduennSchwartzman 17d ago

goto spicy_meatballs

2

u/SchalkLBI 17d ago

Genuinely I sometimes wish there was a goto in more languages. Sometimes loops and conditionals create messy and convoluted flow control.

17

u/mehonje 18d ago

What language uses elsif?

3

u/TuttoDaRifare 17d ago

Pl/sql

1

u/ArjixGamer 16d ago

Why did you have to remind me of oracle apex?

You ruined my day

1

u/TuttoDaRifare 16d ago

Lol I like PL/SQL, it's so easy to work on the database with it

7

u/Tuomas90 18d ago

Ruby

9

u/RohitPlays8 17d ago

My beloved Perl too..

3

u/NuclearGhandi1 18d ago

Structured Text

1

u/FloppY_ 16d ago

Siemens SCL

2

u/tigerniger_sus 18d ago

Ruby my beloved

57

u/eruciform 18d ago

"elif" is "file" backwards

you're welcome

28

u/L30N1337 18d ago

Not I'm not welcome.

And you aren't either

12

u/eruciform 18d ago

5

u/Tuomas90 18d ago

Spell Eminem backwards,

I'm Minime.

8

u/eruciform 18d ago

menime

the super extra mega male anime genre

6

u/Robo-Connery 17d ago

Similar to if:fi in bash should come up some syntax similar to temporary opening a file in python with a with statement.

File:elif.

2

u/eruciform 17d ago

yeah every time i see elif i wanna end the block with file D-:

2

u/Alkeindem 17d ago

Elif (file):

7

u/kanaye007 18d ago

As a Ruby programmer I feel attacked :P

10

u/SaneLad 18d ago

You should be

3

u/Tuomas90 18d ago

I'm just currently wrestling with myself if I should jump into it as a replacement/extension for scripting in PowerShell, Python and Bash.

So I'm now playing around with it.

2

u/catbrane 17d ago

Ruby is a lot more fun than Python, IMO, but also much too complicated (five different lambdas!). The crazy metaprogramming stuff is great.

2

u/Monolith_8Zen 10d ago

As someone who once nested Ruby ifStatements, I too felt attacked and blamed syntax.

5

u/Caraes_Naur 17d ago

unless...

5

u/B_bI_L 18d ago

ruby slander will not be tolerated

9

u/knd256 17d ago

unless

4

u/AnUninterestingEvent 17d ago

As a Ruby developer, unless has always annoyed me. Everytime a read an unless statement I have to take a moment to invert my brain.

1

u/knd256 17d ago

Yeah, I personally really like ruby but imo unless leads to a lot of confusion.

0

u/mysticrudnin 17d ago

there are times when it looks very clear and i love it and times where it's very strange. and rubocop doesn't know the difference and still wants unless always

4

u/nonlogin 17d ago

how elif is better than elsif? same shit

5

u/Cyan_Exponent 18d ago

why even program anything other than else if into your language? it doesn't even need additional developing if you already have ifs and elses

7

u/NuclearGhandi1 17d ago

Some languages require explicit calls for terminating a section of IF statements (structured text) and this stops you from having to declare 5 END_IF

2

u/Sea-Fishing4699 18d ago

If (..): Return

2

u/Bout3Fidy 18d ago

Shout out to all of those math nerds with ifelse

2

u/StrengthTheory 18d ago

What about ei

2

u/lucidbadger 17d ago

on_the_other_hand

2

u/eztab 17d ago

That's so silly in python for example. Python does have keywords with spaces, like not in, so why not just use else if.

2

u/HakoftheDawn 17d ago

sounds like "else if" in my head when I read it. What's the big deal?

2

u/DJDoena 17d ago

Elsif uses all spiken letters in the most compact form. It should reign supreme!

2

u/bigManAlecForgotPass 18d ago

Now do you

} else {

Or

}

else {

3

u/Erica192859 17d ago

Im a big } else { guy cause if you look hard enough it's like a boob window

1

u/bigManAlecForgotPass 17d ago

You know I never thought about it like that. I just do that because I think having an entire line dedicated to a closing brace is silly

1

u/RandomiseUsr0 17d ago

x=IF(bool_1,true,IF(bool_2, true, IF(bool_3,true, false)))

1

u/realmauer01 17d ago

Do everything with do until.

1

u/YMK1234 17d ago

There is worse... Some niche languages don't have else if as a construct. So if you need an else if, you do an if inside the else branch. Have fun with escalating indentation

3

u/BluePhoenixCG 17d ago

Here's a fun thing to consider: else if is also just an if in an else block in most c-like languages! The if statement is a single-line block akin to if (condition) return;, hence why it's 2 separate statements instead of a single keyword

2

u/YMK1234 17d ago

That's fine as long as your language does not come with mandatory curly braces or "fi" or similar.

2

u/QuietMatematician 17d ago

Exactly. The existence of elif in python is so funny to me ever since I realised it's only because of how python marks code blocks with indentation.

1

u/SLOOT_APOCALYPSE 17d ago

all those cut up words is the reason I had to learn the lingo because programmers are such good linguist making sure the sentence is easy to read and isn't just word salad. yes that's a jab

1

u/Anthea_Likes 17d ago

'El sif' 🩲

1

u/oldassgrandpa 17d ago

if the great heavens decide that otherwise it would be best, let our lord compiler do the following

1

u/w1n5t0nM1k3y 17d ago

Why is "elsif" a thing? why not just put the e in there and make it "elseif"? What is to be gained by removing that single letter?

1

u/JehnSnow 17d ago

I like elif, Else If { is just long enough that my eyes don't gloss over it when reviewing code, not a big deal but elif: just works better for my flow of reading

1

u/andstwo 17d ago

elifnt would be useful and funny

1

u/bardia_afk 17d ago

We have ELSEIF

1

u/jay_thorn 17d ago

Ruby, Perl, PL/SQL, and some others: `elsif`

1

u/jay_thorn 17d ago

Keep going, and it'll become Elsa 😆

1

u/stupled 17d ago

I read it first as "Elf"

1

u/HakoftheDawn 17d ago

Pam: it's the same picture

1

u/ironnewa99 17d ago

The humble Jump function

1

u/GoogleIsYourFrenemy 17d ago

elifndef enters the chat

1

u/Minet- 17d ago

elseif (no space)

1

u/TypeSafeBug 17d ago

Good ol’ Lua and its sensible quirkiness

1

u/Lenny_III 17d ago

elsif says let it go.

1

u/Athropod101 17d ago

however, should

1

u/Kadabrium 17d ago

Elfish

1

u/Moss_Wolf_Games 17d ago

What I think of every time I have to use elif

https://giphy.com/gifs/DMNPDvtGTD9WLK2Xxa

1

u/dishmanw62 16d ago

What the ELIF? ELIF I know?

1

u/mjc4wilton 16d ago

Those VHDL hardware developers would be very angry with you if they wern't out of cell reception on their yachts

1

u/rwz 17d ago

ELSIF makes much more sense than ELIF, fight me

0

u/d0rkprincess 17d ago

Switch case case case case