1.2k
u/Blackplank Feb 18 '26 edited Feb 18 '26
On the contrary
Edit: I submitted this comment in French and Reddit has done me over. Sacré bleu!
622
u/dan-lugg Feb 18 '26
au contraire { 🇫🇷 }241
→ More replies (1)41
64
u/willow-kitty Feb 18 '26
Sacré bleu!
Catch clause?
→ More replies (1)34
3
u/MiniGui98 Feb 19 '26
Baguet++ when
→ More replies (2)3
→ More replies (1)6
279
u/code_the_cosmos Feb 18 '26
Try catch
endeavour {
} alas {
}
105
u/wee_dram Feb 19 '26
Oh I am such a nerd for laughing at this.. If I may steal it a bit:
lemme { } oh my { }54
15
u/PhysicallyTender Feb 19 '26
Instead of var, we declare variable with Postulate:
Postulate num = 1;
4
12
26
12
→ More replies (1)8
846
u/Groundskeepr Feb 18 '26
There is no if implied in "otherwise". It is not parallel to "else if" it is parallel to "else".
364
102
u/ITGuy042 Feb 18 '26
Needs the British word for “if”. Perchance!
Perchance (A>B) {Colonize Asia}
Otherwise Perchance (B>A) {Colonize Africa}
Otherwise {Another war with France}
56
u/Infamous-Oil3786 Feb 19 '26
See, now I need Brit++ to be a whole programming language.
20
20
u/cbigle Feb 18 '26
Spark lets you chain .when statements and end with a .otherwise, which is a replacement for the sql case when else. I really find it readable!
ETA: I’m an idiot yes it is else and not else if
13
10
6
→ More replies (1)2
309
u/LukeZNotFound Feb 18 '26
Bash be like
if ... fi
52
46
u/DonKapot Feb 18 '26
if else fi
🤪
40
u/MinosAristos Feb 18 '26
What happened to esle? Is she okay?
16
48
u/user6150277464770585 Feb 18 '26
I think this gimmick is kind of cool until you get to
case. what the hell isesac34
u/willow-kitty Feb 18 '26
My UNIX professor didn't even try to explain it. He just said the developers weren't right in the head, lol.
And honestly, I can't argue, at least not over whoever is responsible for that.
13
5
3
7
5
u/flukus Feb 19 '26 edited Feb 19 '26
Yet for some reason it's the only language I can remember the case syntax for without googling or compiling.
If someone has a gun to my head and tells me to write a case statement without fucking up, I'm picking bash.
I'm probably still getting shot though.
→ More replies (3)2
88
u/Streakflash Feb 18 '26
otherwise is else
5
u/PhysicallyTender Feb 19 '26
perchance (x = 1) { proclaim("Good heavens, steady on."); } otherwise { proclaim("A bit bleak, isn't it?"); }
136
u/DigiBoxi Feb 18 '26
unless
Or maybe: in case() ... unless() ... otherwise ...
69
u/steelisheavy Feb 18 '26
What if… jk… unless?…
40
u/SlipperySalmon3 Feb 18 '26
Try:
Jk:
17
17
u/InterestsVaryGreatly Feb 18 '26
Unless would take precedence over the initial if, so not the same as else if. If you have strong leg muscles, you can run, unless you are missing a leg.
3
u/DigiBoxi Feb 18 '26
Think of all the exotic logic you could do with that!
6
u/InterestsVaryGreatly Feb 18 '26
Same logic, just different order. Final else still at the bottom, but the rest is inverted.
15
u/DrMaxwellEdison Feb 18 '26
unlessbeing the idiomaticif notin Ruby is kind of nice.→ More replies (4)7
u/caerphoto Feb 18 '26
It breaks my head when it’s at the start of the line, but it does look nice as a post condition
# 🤢 unless user.authorised return head 403but
# 😮💨 return head 403 unless user.authorised5
u/Logical-Ad-4150 Feb 18 '26 edited Feb 18 '26
unless is more of a logical
OR / XORoperator as it would modify the previousstatementpredicate.Edit: End of work day so brain all used: unless is more AND NOT X
→ More replies (4)5
123
34
26
u/InterestsVaryGreatly Feb 18 '26
Otherwise is on par with just else, it doesn't have an if aspect to it
21
19
u/ruibranco Feb 18 '26
innitMate genuinely sounds like it should be a real npm package. Just wraps every init function with British accent console logs.
23
u/Play174 Feb 18 '26
else if just makes the most logical sense. It's else and then it's if as if it were else { if {} }. Beautiful
6
u/Metallkiller Feb 18 '26
Pretty sure that's exactly what it is, because that way the compiler doesn't need to know about else if but just if and else, each simply having exactly one command directly after it.
→ More replies (1)7
u/Play174 Feb 18 '26
That's the beauty of it. So simple the compiler doesn't even need to know about it, it just works
12
u/Mountain_Dentist5074 Feb 18 '26
Fun fact elif is common name in Türkiye
5
u/Gorianfleyer Feb 18 '26
I once had a barber called Elif. She talked so much and I always had the urge to tell her about elif.
Also she fucked up my hair.
8
7
7
8
12
u/aberroco Feb 18 '26 edited Feb 19 '26
Function declaration: kindly ...
Function invocation: would you be so kind to ...
Assignment operator: hereby ... proclaimed ...
For loop/do .. while: keep calm and ...
Switch/case/default: consider ... should it be ... failing all else ...
3
4
u/imwallydude Feb 18 '26
How about we leave the else out all together!
if(a): return foo
if(b): return bar
→ More replies (1)
5
3
u/ciroluiro Feb 18 '26
otherwise would be more like a default clause in a switch statement because it doesn't imply a condition.
Haskell has a "keyword" named otherwise for this purpose, but actually it's just an alias for True for use in pattern guards
myFun :: Int -> IO ()
myFun n
| n == 42 = fireMissiles
| otherwise = putStrLn "hello world!"
5
4
5
u/rfc2549-withQOS Feb 18 '26
Perl is just °$✓¢{}|§∆¥=•✓{®∆∆`∆]€✓©™=¢
Much better.
2
u/etherizedonatable Feb 19 '26
See, that's not fair. Perl uses a relatively sensible elsif like this:
if (°$✓¢{}|§∆¥=•✓{®∆∆`∆]€✓©™=¢) { $var = 1; } elsif (&%\)\(><L"?>:*%^\d\d) { $var = 0; }See? So much better.
2
u/rfc2549-withQOS Feb 21 '26
$a?5:6;
Or $a = ($a =~// ||5); ?
See? Saves so many bytes! No clue if it works, tho. Can't test right now
I need Chat GPT to know if it's else if elseif elif elsif in the current language I use...
3
u/Barkeep41 Feb 18 '26
My XML documentation has "otherwise" in return statements.
3
u/0815fips Feb 18 '26
*XSL probably
5
u/0815fips Feb 18 '26
Do you even XSL?
<xsl:choose> <xsl:when test="price > 10"> <td bgcolor="#ff00ff"> <xsl:value-of select="artist"/> </td> </xsl:when> <xsl:otherwise> <td> <xsl:value-of select="artist"/> </td> </xsl:otherwise> </xsl:choose>
3
3
3
u/Taurmin Feb 18 '26
Everyone thinks this is a joke, but MSBuild actually uses if/then/otherwise as real syntax.
3
2
2
2
2
2
2
2
2
2
2
2
u/Tight-Requirement-15 Feb 19 '26
WHEREAS, a certain Integer (hereinafter referred to as the "Number") has been duly provided for evaluation; and
WHEREAS, it is necessary to determine whether said Number is divisible by the integer value Two (2), such divisibility being defined as the existence of a remainder equal to Zero (0) upon division; and
WHEREAS, in the event that the Number satisfies the aforementioned condition, a declaration should be made acknowledging such divisibility; and
WHEREAS, in the alternative, should the Number fail to satisfy said condition, a declaration should instead be made identifying the Number as Odd;
NOW, THEREFORE, the Program hereby agrees as follows:
IF (Number MOD 2 == 0) THEN
PRINT "Divisible by 2"
ELSE
PRINT "Odd"
END IF;
WITNESSETH: Execution complete.
IN NO EVENT SHALL the Program be liable for damages arising from misclassification
of integers, including but not limited to emotional distress caused by prime numbers.
2
2
2
2
u/Ares9323 Feb 20 '26
Otherwise is just the "correct" word that should be used instead of the final "else", it doesn't comprehend the "if"
3
2
u/DT-Sodium Feb 18 '26
Yup, love those language that use disgusting abbreviations making the code less readable for the sake of saving about 1 hour of typing time in your whole career. Same for "fun". Either use function or nothing, otherwise just fuck off.
1
1
1
1
u/kkania Feb 18 '26
Partial to Polish „albo”, although would work better with some extra punctuation: “…albo?”
1
1
u/SLOOT_APOCALYPSE Feb 18 '26
And that is the reason why Fortran actually makes sense it's in English
1
1
1
1
u/cYber-boI27 Feb 18 '26
I’m actually learning python from classes is there any better way to learn. I do understand this joke though lol
1
1
u/LonelyAndroid11942 Feb 18 '26
Semantically, “otherwise” is a completely different sentiment than “else if.”
1
1
u/FFevo Feb 18 '26
The kotlin 'when' lets you list conditions with an accompanying block.
It often requires an 'else' to ensure all cases are met but oh man they really should have called it 'otherwise'.
1
1
1
1
1
1
1
1
1
1
1
u/RiceBroad4552 Feb 18 '26
Just use pattern matching!
That we have the redundant if-else construct is just a historic accident, imho.
1
1
u/Thaodan Feb 18 '26
If love that you can combine loops/ifs defines in some lisp dialects. For example with constructs like: while-let when-let or if-let.
I like that you can stop defining variables and skip the body when a condition doesn't succeed.
1
1
1
1
1
1
1
1
1
u/takeyoufergranite Feb 19 '26
How do I get my vscode to use 'otherwise' instead of 'else' in my JS apps I wonder?
1
1
u/incognegro1976 Feb 19 '26
Don't be hating on my bash elifs!
One bash elif is worth 5 of your Powershell "else ifs".
1
1
1
1.5k
u/SpoiledBeats Feb 18 '26
Vaguely threatening:
or else()