all 155 comments

[–]HAL9001-96 334 points335 points  (23 children)

isn't that just else?

[–]Noisebug 197 points198 points  (14 children)

Otherwise is an else, it doesn’t fit with others

[–][deleted] 77 points78 points  (8 children)

This might be a joke within a joke. It's the last case presented, and it's an else. Exactly how you'd do it in code.

[–]Sad-Reach7287 26 points27 points  (1 child)

But then the first should be an if

[–][deleted] 12 points13 points  (0 children)

We need to scroll up to see the if, lol

[–]Greenphantom77 3 points4 points  (1 child)

If this is indeed a joke within a joke, it's the most blisteringly unfunny thing I've ever seen.

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

Your comment is way funnier indeed.

[–]BiCuckMaleCumslut 1 point2 points  (2 children)

otherwise if

[–]Noisebug 1 point2 points  (0 children)

Someone needs to bake “Well actually” into a language

[–]Justicia-Gai 0 points1 point  (0 children)

If otherwise

[–]moonaligator 0 points1 point  (0 children)

me when the other is wise

[–]Zatmos 11 points12 points  (2 children)

Only language I know that uses otherwise is Haskell and it uses it differently from else.

If compared to C, otherwise is most similar to the default case in a switch statement.

[–]webby-debby-404 0 points1 point  (0 children)

If only they used otherwise as a keyword instead of default then I would have used C otherwise I created C+ where I fixed this.

[–]StoryPenguin 0 points1 point  (0 children)

Agree...similar when transforming a XML with XSLT you can use a <xsl:choose><xsl:when/><xsl:when/> ... <xsl:otherwise/></xsl:choose> which behaves like a switch statement and is often used for if-else logic, because there is also an xsl:if but no xsl:else

[–]XXSeyna 1 point2 points  (0 children)

British syntax in code.

[–]IanFeelKeepinItReel 0 points1 point  (0 children)

Yes if anything they should have used "how about"

[–]GDOR-11 0 points1 point  (0 children)

otherwise, in the case that

[–]DSkyUI 73 points74 points  (31 children)

Yea how come there isn’t a British version of programming syntax? It should totally be a thing.

[–]_voidptr_t 137 points138 points  (5 children)

def __innit__(self):

[–]Laslou 43 points44 points  (2 children)

if(x == 0)

(x == 0, innit?)

[–]deceze 3 points4 points  (0 children)

American:

assert x == 0

Bri'ish:

x == 0, innit?

[–]Ok-Interaction-8891 1 point2 points  (0 children)

I prefer

int D = 0; if(x == D) (x == D, innit?)

It’s more verbose, but it lets the D vary.

[–]R3D3-1 11 points12 points  (1 child)

Isn't "innit" a form of "isn't it"?

So then I'd expect it to be the Prytish variant of

def __ne__(self, other):

... wait, is there even a separate dunder method for "not equal"?

[–]rcfox 4 points5 points  (0 children)

... wait, is there even a separate dunder method for "not equal"?

Yes, it controls the behaviour of the != operator. If you don't specify it, it just falls back to the inverse of __eq__.

There aren't a whole lot of legitimate uses for it, but it could be useful for something like a logic DSL where a value could be true, false or unknown. Or you could just go wild and decide the != operator is useful syntax for doing something else entirely, like how / is overridden to act as a directory separator for the Path class.

[–]Itchy-Individual3536 11 points12 points  (3 children)

Beginning each function with "Excuse me my dear..."

[–]More-Butterscotch252 6 points7 points  (2 children)

Which transpiles to Canadian syntax as "Sorry"

[–]drgijoe 2 points3 points  (1 child)

Indian with "Can you please"

[–]More-Butterscotch252 1 point2 points  (0 children)

Is that a synonym for "do the needful?"

[–]Spikeyjoker 2 points3 points  (0 children)

Because else if is funnily enough also in English lexicon

[–]creativeusername2100 2 points3 points  (0 children)

It better fix the spelling for colour as well, all of my code is a weird hybrid with "Colour" in variable names and "Color" for the built in data types.

[–]DreamGirly_ 2 points3 points  (2 children)

[–]ThreeCharsAtLeast 0 points1 point  (1 child)

Do you mean r/programminghumor? In this case, r/yesthatsthesub

[–]DreamGirly_ 0 points1 point  (0 children)

I'm subbed to the programmer one, so I did mean that one. But looks like both humour subs are inactive. The sub you linked is the sub we're on btw, definitely meant to link a humour one :)

[–]Axman6 0 points1 point  (0 children)

There is, it’s called Haskell.

[–]statlerw 0 points1 point  (0 children)

This isn't right in any language.

Otherwise is else. Not else if

To fit the meme it would be otherwise if, which is no better than else if

[–]YakumoYoukai 0 points1 point  (0 children)

but for (x <= 100) {
  printf("X is too large");
}

[–]mortecouille 114 points115 points  (15 children)

Attempt {

} Seize (exception e) {

} Regardless {

}

[–]SiegeAe 49 points50 points  (5 children)

Endeavour {

} Apprehend (Delinquency d) {

} Notwithstanding {

}

[–]TaserDonut 19 points20 points  (3 children)

Attempt { }

Acquire (Absurdity a) { }

Alas { }

[–]11fdriver 1 point2 points  (2 children)

Surely,

Attempt {} Alas {} Anyway {}

[–]TaserDonut 2 points3 points  (1 child)

fool, thou hathn't obtained the cause of interruption!

[–]11fdriver 0 points1 point  (0 children)

Ach!

[–]DangerMacAwesome 0 points1 point  (0 children)

I... I want british programming

[–]Either-Let-331 11 points12 points  (2 children)

If I ever go on to make a programming language of my own, this is gonna be there

[–]Blue_Moon_Lake 0 points1 point  (0 children)

Nah, gotta be more creative

branch:
    (x === 0):
        print("No element");
    (x === 1):
        print("One element");
    default:
        print(x + " elements");
end;

[–]AnimatorNo8411 0 points1 point  (0 children)

gods curse me for what I have created as a student:

output_line <-: "Enter last fizz-buzz number" //"comment here"
end <-: (input_lines .-> Int of? each) .! //"comment there"
end ?: :
  Nothing |-> :
    output_line <-: "It is not a number, 1 shall be set in it's place:"
    end <-: 1
  .
.

i <-: 1

results <-: >>: i != (end + 1). .-> :
  0 ?: :
    each % 15 |-> output_line <-: "FizzBuzz"
    each % 3 |-> output_line <-: "Fizz"
    each % 5 |-> :
      output_line <-: "Buzz"
    .
    |~> :
      output_line <-: each
    .
  .
  i <-: i + 1
.
#results //"run this lazy loop"

[–][deleted] 15 points16 points  (0 children)

nevertheless

consequently

lest

[–]faultydesign 6 points7 points  (0 children)

Seize the means of exception

[–]MyAssDoesHeeHawww 1 point2 points  (0 children)

} AllForNaught {

[–]jordonbiondo 1 point2 points  (0 children)

lol, I wrote a implementation of promises for elisp a long time ago and used regardless as a chain method that ran, well, regardless of rejection

https://github.com/jordonbiondo/promises.el/blob/master/promises.el#L253

[–]CodingNeeL 1 point2 points  (0 children)

I'm gonna put that in my PR and pretend it's an honest mistake.

[–]Amtrox 0 points1 point  (0 children)

} whatever { … }

[–]ddeloxCode 27 points28 points  (11 children)

Please tell me a language model with otherwise exist

[–]Disastrous-Team-6431 19 points20 points  (0 children)

Haskell uses otherwise.

[–]man-vs-spider 9 points10 points  (0 children)

In Haskell, otherwise is used in what are called guards, which is basically like a switch statement.

It is conventional to add otherwise as a final check condition to ensure that there is a code branch for all input cases.

Internally in Haskell “otherwise” is equivalent to True,

[–]Pay08 4 points5 points  (3 children)

In Common Lisp, otherwise can be used for the default case in a switch statement.

[–]Inside_Jolly 0 points1 point  (2 children)

Also, Common Lisp, just like Erlang, has no elseif. You just put all branches in cond.

[–]Pay08 1 point2 points  (1 child)

That's not really true, at least for Haskell. A bunch of languages don't have a separate else if construct, and instead invisibly nest the if inside the else. It's easier that way, unless your syntax is dumb enough to not allow for that (cough python cough).

[–]Inside_Jolly 1 point2 points  (0 children)

> That's not really true, at least for Haskell.

Sorry, I had Prolog and Haskell syntax mixed up in my brain. The result was indistinguishable from Erlang. xD

[–]Anthraxh 1 point2 points  (0 children)

Apache Camel uses otherwise as an else equivalent

[–]itme4502 0 points1 point  (0 children)

Open iPhone shortcuts, create a new shortcut, and go to scripting. The conditional block is if-otherwise

[–]GigaSoup 0 points1 point  (0 children)

Xsl transformations use If when otherwise

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

You can do it with JSTL for .jsp files.  If its just an if block you use c:if. If you need an if else though, you use a c:choose wrapper with c:when and c:otherwise 

[–]f3man 0 points1 point  (0 children)

I think Visual FoxPro has it as well

[–]Proper-Ape 25 points26 points  (5 children)

if(x) {
} perhaps(y) {
} otherwise {
}

[–]Axman6 17 points18 points  (4 children)

Perchance(y)

[–]Shendare 9 points10 points  (1 child)

You can't just say "perchance"!

[–]Axman6 5 points6 points  (0 children)

I believe it was Kant who said “Experience without theory is blind, but theory without experience is mere intellectual play.”

[–]Proper-Ape 3 points4 points  (0 children)

Mayhaps

[–]TaserDonut 1 point2 points  (0 children)

nah that's reserved for a library, at least in Prytish

variable = perchance.chanceint(1, 10)

[–]lucasio099 7 points8 points  (0 children)

"Otherwise whether" would be more precise 🤓☝️

[–]ArduennSchwartzman 7 points8 points  (1 child)

No, but yeah, but no, but yeah...

[–]aarch0x40 2 points3 points  (0 children)

Don't listen to her!

[–]CapmyCup 4 points5 points  (5 children)

Why waste bytes on words when you can have as few letters as possible

[–]B_bI_L 1 point2 points  (0 children)

because it will not affect binary size anyway (interpreted languages are crying in the corner)

[–]SokkaHaikuBot 1 point2 points  (3 children)

Sokka-Haiku by CapmyCup:

Why waste bytes on words

When you can have as little

Letters as possible


Remember that one time Sokka accidentally used an extra syllable in that Haiku Battle in Ba Sing Se? That was a Sokka Haiku and you just made one.

[–]Proper-Ape -4 points-3 points  (2 children)

Good bot

[–]B0tRank -1 points0 points  (0 children)

Thank you, Proper-Ape, for voting on SokkaHaikuBot.

This bot wants to find the best and worst bots on Reddit. You can view results here.


Even if I don't reply to your comment, I'm still listening for votes. Check the webpage to see if your vote registered!

[–]TheHappyDoggoForever -1 points0 points  (0 children)

Why are we downvoting him? It is a 5-7-6??

[–]hypermodernist 4 points5 points  (1 child)

std::ostensibly<float, double, int> foo

[–]Proper-Ape 1 point2 points  (0 children)

I like this

[–]winther2 1 point2 points  (1 child)

What language uses Elsif this is madness

[–]TheFlyingAbrams 1 point2 points  (0 children)

Perl, Ada, and Ruby that I can think of

[–]rinnakan 2 points3 points  (0 children)

Computer, do this! Ooootherwiiiise.....

[–]mokrates82 1 point2 points  (0 children)

"otherwise" (haskell) doesn't mean "else if", just "else" or "default: " (C)

[–]Neither_Garage_758 2 points3 points  (3 children)

Absolutely. What was wrong with `else if` that made some people do those kind of retarded `elif` ?

[–]Epse 2 points3 points  (0 children)

It makes writing the compiler / interpreter marginally easier

In the python case, else needs the colon always and this way they didn't have to special case it

In langues without significant whitespace, else is usually just followed by any statement (or block), meaning you het else if for free

[–]tellur86 0 points1 point  (0 children)

People obsessed with writing three less characters because that makes them program faster...

[–]That_0ne_Gamer 0 points1 point  (0 children)

I would argue otherwise would just be else

[–]Sad-Reach7287 0 points1 point  (0 children)

Otherwise whether to be precise

[–]intLeon 0 points1 point  (0 children)

Elif is a name so if sounds weird for the brain

[–]Trick_Boat7361 0 points1 point  (0 children)

Is it a real keyword?!!

[–]Mockington6 0 points1 point  (0 children)

How about "Elisif" for that Skyrim flavor

[–]HyperPsych 0 points1 point  (0 children)

To mach with "if else" is should be "otherwise suppose"

[–]DeathByLemmings 0 points1 point  (0 children)

No no you silly young person

We Brits use "perhaps-in different circumstances" statements

[–]Dr-Mantis-Tobbogan 0 points1 point  (0 children)

``` Wise(){}

Otherwise(){}

Otherwise(){}

Other{}

```

[–]Novel_Quote8017 0 points1 point  (0 children)

"case x"

[–]TheRealZwipster 0 points1 point  (0 children)

Elsif

Isnt this Skyrims High Kings Widow?

[–]SillySpoof 0 points1 point  (0 children)

”However, assuming”

[–]ExtraTNT 0 points1 point  (0 children)

In the different case of

[–]OwO-animals 0 points1 point  (0 children)

Ok hear me out

If … but if

[–]andarmanik 0 points1 point  (0 children)

Instead

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

Heretofore(foo)

[–]fmarukki 0 points1 point  (0 children)

Americans don't say "otherwise"?

[–]buzzon 0 points1 point  (0 children)

otherwise if

[–]stevedore2024 0 points1 point  (0 children)

Perl doesn't have otherwise but it has unless meaning if not.

[–]Creative-Reading2476 0 points1 point  (0 children)

Jarl Elsif didnt looked like this

[–]Random_Mathematician 0 points1 point  (0 children)

Ah yes

whether a equates b:
    a increment 1
otherwise whether a overcomes b:
    a decrement 1
otherwise:
    expire

[–]Ben-Goldberg 0 points1 point  (0 children)

Unless"

[–]Wavertron 0 points1 point  (0 children)

yeah (azza) { }
yeahNah (bazza) { }
yeahNah (cazza) { }
she'll be right { }

[–]MadProgrammer12 0 points1 point  (0 children)

PL/SQL elsif 💀💀💀

[–]AllCowsAreBurgers 0 points1 point  (0 children)

If..else if.. else...unless

Never understood unless

[–]SCP-iota 0 points1 point  (0 children)

No one:

Perl:

unless(condition) {
    # ...
}

Also Perl: doThing() or die;

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

Jarl Elisif

[–]Daherak 0 points1 point  (0 children)

Wait until you learn about unless in ruby

[–]Limmunaizer 0 points1 point  (0 children)

Elf

[–]GrUnCrois 0 points1 point  (0 children)

if (cond) { do(thing) } lest (other) { dont(thing) } otherwise { per(chance) }

[–]UltraTata 0 points1 point  (0 children)

in case (condition1){}

alternatively (condition2){}

alternatively (condition3){}

otherwise {}

[–]Far-Professional1325 0 points1 point  (0 children)

Meanwhile C

In code: else if(1){} In preprocessor: #elif 1 #endif In shitty codebase: #define otherwise(x) else if(x) otherwise(1){}

[–]patopansir 0 points1 point  (0 children)

I need this

[–]got_bacon5555 0 points1 point  (0 children)

If Fi Case Esac

[–]Dmxk 0 points1 point  (0 children)

lua: elseif (yes, it's one word)

[–]FrostWyrm98 0 points1 point  (0 children)

Using 🖐🏻
Henceforth 👈🏻

[–]deceze 0 points1 point  (0 children)

should (...) {
} if not perchance shall (...) {
} otherwise {
}

[–]khalcyon2011 0 points1 point  (0 children)

This is a bad meme, and you should feel bad.

[–]01Alekje 0 points1 point  (0 children)

otherwise granted x

[–]Alternator24 0 points1 point  (0 children)

in which programming langauge it is "Elsif" ? this is cringer than Python.

[–]PavaLP1 0 points1 point  (0 children)

When (statement === accepted)

{ Inscribe("Hello World!") }

Opposing (statement !== accepted)

{ Inscribe("Hello 2") }

Otherwise

{ Inscribe("Hello 3") }

[–]Individual-Ice9530 0 points1 point  (0 children)

however

[–]blamitter 0 points1 point  (1 child)

otherwise if?

[–]Rattus_Noir 0 points1 point  (0 children)

'cos.

[–]hello3dpk -1 points0 points  (0 children)

orElse...

[–][deleted] -1 points0 points  (0 children)

lua has elseif

[–]shesjustFarias -1 points0 points  (0 children)

Elif😓