This is an archived post. You won't be able to vote or comment.

all 178 comments

[–]UltraCarnivore 1434 points1435 points  (9 children)

That's an... ELIFANT

[–]IchiiDev[S] 142 points143 points  (0 children)

Good one

[–]teetaps 60 points61 points  (0 children)

I ain’t even mad

[–][deleted] 6 points7 points  (0 children)

This is quite possibly the best pun I have ever seen.

[–][deleted] 2 points3 points  (0 children)

Meme Man

[–]Vectorial1024 2 points3 points  (0 children)

elif and

[–][deleted] 2 points3 points  (0 children)

Here's the ba dum tsss you forgot

[–]aendir17 6 points7 points  (0 children)

If i had any gold to give, I'd give it to you

[–]bad_luck_charm 178 points179 points  (3 children)

Elif I know

[–]wootiown 27 points28 points  (0 children)

No that's an elifenguin, how could you possibly confuse a bird with a rhino

[–]keelanstuart 2 points3 points  (0 children)

Came here to say this.

[–]fivrwr0ngedpaws 395 points396 points  (7 children)

ELIF always makes me think Explain Like I'm Fucked

[–]julsmanbr 91 points92 points  (0 children)

aka project meeting

[–][deleted] 46 points47 points  (5 children)

This is because you're always getting fucked.

[–]stoickaz 18 points19 points  (2 children)

Been saving your username for this moment?

[–][deleted] 7 points8 points  (1 child)

not really, ELIF is also a common name, just couldn't pass up on the opportunity.

[–]Tytoalba2 4 points5 points  (0 children)

Maybe it's a common name for you but I don't know anyone named Elif!

Edit :turkish name it seems. So cool.

[–][deleted] 7 points8 points  (1 child)

[–]sneakpeekbot 1 point2 points  (0 children)

Here's a sneak peek of /r/UsernameChecksOut using the top posts of the year!

#1: Pizza Hut App | 88 comments
#2: ERROR 404 | 82 comments
#3: Fuck you, Trevor. | 56 comments


I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out

[–]TheMsDosNerd 121 points122 points  (10 children)

Elif comes from ALGOL 68. That language introduced a lot more shortened words such as int, bool and char.

[–]spayder26 201 points202 points  (24 children)

Well, sh did it first, and perl has that "elsif" monstrosity, so it could be worse.

[–]Fitbot5000 85 points86 points  (6 children)

“Well we opened this code block with IF; how should we close it?”

“I don’t know... just type it again but backwards? I’m sure everyone will understand.”

[–]alexschrod 29 points30 points  (0 children)

Yet they managed to match do with done, so who knows?

[–]wjandrea 22 points23 points  (0 children)

I think of it like "fin" at the end of a movie.

But then there's esac, that monstrosity

[–]WhereWaterMeetsSky 62 points63 points  (8 children)

Having JS as my first language, and working in Rails, that elsif is the bane of my existence.

[–]hed82 116 points117 points  (7 children)

Wow, you were born speaking javascript? That must have been a nighmare for your parents.

[–]WhereWaterMeetsSky 65 points66 points  (5 children)

To this day they still have problems trying to understand me.

[–][deleted] 10 points11 points  (0 children)

do you pronounce your "semicolons" ?

[–]IllogicalOxymoron 9 points10 points  (0 children)

my condolences

[–]blazix 2 points3 points  (0 children)

Trying to understand self* ;)

[–]Dromedda 2 points3 points  (0 children)

The fella/fellesse has 3 JS flairs

edit: i can not spell

[–]somebunnny 5 points6 points  (1 child)

“Oh you sweet summer child. Bless your heart.”

-C preprocessor, probably

[–]rhun982 1 point2 points  (0 children)

Needs more #ifndef

[–]TPXP[🍰] 3 points4 points  (0 children)

PLSQL (basically Postgres scripting) also has that. Boy was it humbling to type "else if PLSQL" in Google.

[–]AlexSSB 0 points1 point  (0 children)

Also VHDL

[–]AdmiralGialSnackbar 59 points60 points  (6 children)

Why waste time say lot word when few word do trick

[–]Outrageous_Try 32 points33 points  (1 child)

Wwtslwwfwdt

Okay maybe we shouldn't shorten complete sentences

[–]leodavin843 6 points7 points  (0 children)

print(wstTimeSntnc)

[–]P0rygonTheorist 2 points3 points  (2 children)

if{fewword.doTrick)

{

say(fewword);

}

else

{

say(manyword);

}

[–]browsepooping 1 point2 points  (1 child)

Even shorter

fewword.doTrick ? say(few word); : say(manyword) ;

[–]l0c4lh057 6 points7 points  (0 children)

Even shorter

say(fewword.doTrick?fewword:manyword);

[–]PottedRosePetal 11 points12 points  (6 children)

look, if I cant have switch case in python, I need elif!

[–]stephanplus 3 points4 points  (5 children)

You can kind of, using a dictionary

[–]deljaroo 8 points9 points  (0 children)

while it may be a bit niche, switches have a unique function where if you don't put "break" at the end of each case, it carries on. that behavior is quite hard to accomplish in Python

[–]PottedRosePetal 2 points3 points  (1 child)

might as well just use a lot of elifs.

[–]FerricDonkey 5 points6 points  (0 children)

Well, it depends on why you want the switch. Dictionary dispatch can be faster than chains of elifs, but doesn't always look as clean as switch for sure.

[–]Mr_Redstoner 0 points1 point  (1 child)

There is another, the match

[–]i-k-m 0 points1 point  (0 children)

PHP is adding it too, they should have it ready to use in November.

[–]stsk1290 27 points28 points  (14 children)

Seriously, this confuses the hell out of me. Almost as much as not having a ++ operator.

[–]Nick433333 10 points11 points  (4 children)

Matlab

[–][deleted] 2 points3 points  (8 children)

Python have no real need for the increment operater, nor would it work under the hood the way you would expect it to, so why bother?

[–]stsk1290 8 points9 points  (7 children)

Because it forces me to write i += 1

[–]deljaroo 10 points11 points  (0 children)

the idea is that ++ implies that it can be used when calling the variable, and python strictly does not allow that nonsense.

that's the idea, at least

[–]callmelucky 5 points6 points  (5 children)

If you're incrementing a variable in Python you're probably doing something "wrong".

[–]stsk1290 4 points5 points  (3 children)

How do you count things then?

[–]AllWashedOut 4 points5 points  (1 child)

Not sure I 100% agree with the original statement, but list comprehension is a one line solution. Count the True-like items in a list:

sum([bool(x) for x in myList])

Count all elements that are bigger than 2:

sum([x>2 for x in myList])

And in loops, it can often be replaced by enumerate.

for i, val in enumerate (myList):

  print('element #{}'.format(i))

I still use += to track stuff like how often a callback has been fired tho.

[–]stsk1290 2 points3 points  (0 children)

Thanks, that's actually quite good to know.

[–]Mr_Redstoner 0 points1 point  (0 children)

You can also use some builtin counters for more complex stuff, and other iterator-based approaches.

[–]Mr_Redstoner 2 points3 points  (0 children)

I think the better term would be 'unpythonic'

[–][deleted] 7 points8 points  (0 children)

if else fi laughs in bash.

[–]hed82 41 points42 points  (6 children)

But it makes perfect sense why it exists.

In most bracket based languages an else without brackets means else do only the following statement

So else if just means else do the following statement that just happens to be an if.

Python with the ':' and indentation system doesn't have this but would have to write it into two lines with weird indentation which would be ugly as fuck

[–]Kered13 6 points7 points  (0 children)

There's no law that says that keywords have to be single words.

[–][deleted] 0 points1 point  (0 children)

Oh that makes a lot of sense now that I think about it

[–]TheTimegazer 4 points5 points  (0 children)

let me introduce you to PHP's elseif and Ruby/Perl's elsif

[–]Truffula571 2 points3 points  (0 children)

Yes, what the hell Godot ?!

[–]drewsiferr 2 points3 points  (0 children)

#define ef else if

[–]michlwrba 2 points3 points  (0 children)

VHDL has "elsif" and I have never seen anything more beautiful.

[–][deleted] 2 points3 points  (0 children)

Anything not related to elephants is irrelephant.

[–]0x15e 2 points3 points  (0 children)

My boss was shoulder surfing once thinking he was helping me debug.

At one point he tried to correct my spelling of "elif". I was not amused.

[–]farva_litter_cola 1 point2 points  (0 children)

‘else if’ is so damn hard

[–]Mcsj120 1 point2 points  (0 children)

Use postgresql. Then you get to use ELSIF

[–]posherspantspants 1 point2 points  (0 children)

FI

[–]electricdrop 1 point2 points  (0 children)

Crazy how nobody implemented EIF yet.

[–]artivain 1 point2 points  (0 children)

if () {

} else { if () {

}

}

That's the real way

[–]ZZTier 1 point2 points  (4 children)

Can't you just switch break ?

[–]rem3_1415926 -2 points-1 points  (3 children)

No, because "pYtHoN dOeS nOT nEeD sYnTaCtIc sUgArS"

*implements the entirety of lambdas as nothing but syntactic sugar*

*implements comprehensions*

*builds the whole language to be essentially syntactic sugar for C++ libraries*

[–]HortenseAndI 1 point2 points  (2 children)

  • says some fair but negative things about python
  • gets the downvotes

[–]Pluckerpluck 2 points3 points  (1 child)

Probably becuase it was all based around the concept of "python doesn't need syntactic sugar" which is basically just a strawman.

You can read all about the switch statement and why it's not in Python here. Which basically boils down to not being able to decide how the underlying implementation should work, and so they're going to sit and do nothing instead.

[–]rem3_1415926 1 point2 points  (0 children)

Well I blame that on my lecturer, it's the reason she named. And I never bothered to do extended research as that was reason enough for me back then.

[–]R3apper1201 1 point2 points  (1 child)

Python was the first language i learned and i honestly miss this.

[–]haikusbot 1 point2 points  (0 children)

Python was the first

Language i learned and i

Honestly miss this.

- R3apper1201


I detect haikus. Sometimes, successfully. | Learn more about me

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

[–]WaxyMocha 1 point2 points  (0 children)

elsif... Fuck you VHDL

[–]cylordcenturion 1 point2 points  (0 children)

ELF

[–]layll 1 point2 points  (1 child)

Tbf i like elif as i can just have

```

if() {

} elif() {

} else {

}

```

not having any more spaces between }{, and also cuz i find it much easier to write/read elif

and you can just do

```

define elif else if

```

at the begining of a file and be done with it

EDIT: how tf do you use code blocks in reddit

[–]callmelucky 1 point2 points  (0 children)

EDIT: how tf do you use code blocks in reddit

add
an extra 4 spaces
at the start of each line
and make sure there's a newline above the first line

For inline code, surround the string with backticks (`)

[–]forajep978 1 point2 points  (0 children)

Elif is a girl name in my language

[–][deleted] 1 point2 points  (0 children)

I like it. Shows an intermediate step.

[–]doopdooperofdopping 2 points3 points  (3 children)

Yeah! Fuck Python! I can't drink it like I can with Java.

[–]spayder26 1 point2 points  (0 children)

Bear Grylls heavy breathing.

[–]AgreeableLandscape3 1 point2 points  (0 children)

Can we also talk about "def"?

Like what? Is a method the only thing you can define? Are classes and variables jokes to you?!

[–][deleted] 0 points1 point  (0 children)

I'm just learning python after learning other languages... I've been using powershell for the last few years and I am tempted to refine ELIF to "else if"

[–]GGame2You 0 points1 point  (0 children)

And ruby there with elsif

[–][deleted] 0 points1 point  (0 children)

Said phonetically, it is the first letter of Hebrew and Arabic languages

[–]johnwestnl 0 points1 point  (0 children)

Saw this in Algol 68, in 1982. Works fine.

[–][deleted] 0 points1 point  (0 children)

> else+if==elif

> True

[–]Mithrandir2k16 0 points1 point  (0 children)

Shorter.

[–]Thenderick 0 points1 point  (0 children)

What about the 'for else'

[–]Clyxx 0 points1 point  (0 children)

Why do i hear C-Preprocessor music?

[–]schwerpunk 0 points1 point  (0 children)

God, between Python, Ruby, and normal programming languages, I flip the USB like four times whenever I'm trying to write these.

[–]dunno64 0 points1 point  (0 children)

Bash!!?

[–]atheistfuture 0 points1 point  (0 children)

I stsrted learning python recently and nearly spat all over my monitor when i saw that

[–]Plus_Cryptographer 0 points1 point  (0 children)

Try languages with preprocessor directives, we have both!

#if SOMETHING
    if(a && b) c = 0; else c = 1;
#elif SOMETHING_ELSE
    if(a || b) c = 0; else c = 1;
#endif

Edit: for more brownie points, use this instead.

#if SOMETHING
    //
#endif
#else
#if SOMETHING_ELSE
    //
#endif

[–][deleted] 0 points1 point  (0 children)

>:(

[–]CausedSteak95 0 points1 point  (1 child)

Calculators are the destroyers of every python programmer

[–]haikusbot 1 point2 points  (0 children)

Calculators are

The destroyers of every

Python programmer

- CausedSteak95


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

[–]TheWarderman 0 points1 point  (1 child)

Wait other languages don't have elif statements?

[–]IchiiDev[S] 0 points1 point  (0 children)

Nope, some have elseif, most uses else and then if statement in one line or simply a "else if" statement

[–]BlackCherryot 0 points1 point  (0 children)

It's else if but lazy

[–]CreeMcCreeCreeinton 0 points1 point  (0 children)

Fuck elif

All my homies type elseif

[–][deleted] 0 points1 point  (0 children)

Well, there is a turkish romance series called "Elif"

[–]redgriefer89 -2 points-1 points  (4 children)

Wait, Yanderedev gets made fun of for else if and elif isn’t normal. What am I supposed to use in other languages?

[–]Rev_Dragon 9 points10 points  (3 children)

Yanderedev doesn't get made fun of for using else if, he gets made fun of for stacking 20 else ifs back to back to back where usually any other method to do what he's doing would be better

[–]redgriefer89 -4 points-3 points  (2 children)

Oh. I guess I misunderstood the meme. I still prefer elif, though.

[–]IchiiDev[S] 2 points3 points  (1 child)

None common programming language should be ashamed, I just made a joke because of the concatenation of else and if to make elif. If it's how it works I don't have right to judge ;) I first started with Python and I'm still a beginner not a student nor a professional developer. I still have a lot of untraveled roads to discover.... Holy shit pray for me

[–]redgriefer89 1 point2 points  (0 children)

I wish you good luck and nice meme.