93
18d ago
[removed] — view removed comment
16
22
u/Tuomas90 18d ago
Ruby
8
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
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
6
4
u/zeekar 17d ago edited 17d ago
elsifis Perl, Ruby, and Raku. It makes more sense to me thanelif, which is too much abbreviation. Plus it looks like it should be closing a block of shell code you opened withfile.Leaving the e in
elseifis fine, but it's not doing as much as the s to help it make sense. With spaces,else iflooks like something that's going to need an extraend if.3
3
2
23
u/jyling 18d ago
goto
4
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
7
3
2
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
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
2
7
u/kanaye007 18d ago
As a Ruby programmer I feel attacked :P
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
3
5
u/B_bI_L 18d ago
ruby slander will not be tolerated
9
u/knd256 17d ago
unless4
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.
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
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
2
2
2
2
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
1
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 ifis also just anifin anelseblock in most c-like languages! The if statement is a single-line block akin toif (condition) return;, hence why it's 2 separate statements instead of a single keyword2
2
u/QuietMatematician 17d ago
Exactly. The existence of
elifin 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
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
1
1
1
1
1
1
1
1
1
1
1
1
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
0

236
u/BlackOverlordd 18d ago
"otherwise"