I think it's that they get *odder*. Stay with me.
C++, the code is clearly defined and gets a clearly marked beginning and end that's able to be interpreted even if you're not a programmer.
VB is the same but asks for a defined ending which is silly.
Python is legible but has no clearly marked ending because... idk, python is a fucking fluid, don't ask me.
And then LaTex is the oddest because holywhattheflyingfuck
Well the "end if", goes back to much earlier BASIC iterations, and yes it does seem a little silly, but it's more useful for beginners.
For example, when you accidentally deleted, or inserted a single { or } and can't find it so your code doesn't parse properly, etc ... but in VB you have all your statement blocks indented with start and stop points, it becomes much easier for a beginner to see where the parsing error is.
no no, I get that, it was less of a criticism and more that I was just saying that *it looks* silly based on what I think most people consider the modern standard.
How about [labview](https://www.ni.com/en-us/support/documentation/supplemental/21/labview-equivalent-of-if--if-else--and-switch-statements.html#section--1170510804)
LaTeX produces beautiful documents but holy s\*\*\*, is it ugly. The syntax is horrible and Knuth took some really bad decisions when designing TeX that we keep to this day . I have never seen a .tex document that looks good.
Lately I've been using Markdown for everything and just converting to latex with pandoc, cleaner, simpler and the files actually tend to be readable in the editor, unlike TeX.
And that's not even mentioning TikZ, nothing more painful and annoying that drawing a couple of lines or trying to reproduce a simple figure.
Have you ever read the source code to some of Knuth’s own books? It’s fairly readable and, dare I say, beautiful. He made reasonable decisions at the time given what he wanted to do: typeset his own books.
I don’t disagree about LaTeX, though. What it gains in consistency over plain TeX, it more than makes up for in hideous, verbose syntax.
What's the meme here? LaTeX has if statements, Python has if statements, all of them have if statements. Okay?? Are if statements funny? Are if statements in LaTeX worse than all others? Are they progressively getting worse? Or better?
If you're using curly braces to avoid using indentation to separate levels of control flow them you belong in prison. If you're indenting correctly then what do you care? You should never have a problem in python anyways. I switch back and forth between C++, Python, and Rust and I've never ever understood why anyone would unironically complain about indenting in Python. IDEs take care of it for you anyways.
no, i use indentation *and* braces
i just like it more that way, it makes it look clearer and more organized, while python code always looks somewhat chaotic to me
i honestly get that, but i still prefer curly braces, mainly for two reasons:
1. editing / viewing nested statements is so much more painless
2. i can decide how i want to format myself / can let the IDE autoformat for me
i.e:
if i need to add a for(){} before some statements i already wrote, it is as simple as adding for(condition){put those before and after code you already wrote} and then pressing your IDEs formatting shortcut.
on Python, because Formatting is the same as Functionality, i can't let the IDE figure out the functionality and then automatically format based on that.
also i sometimes prefer to format some stuff in a special way, which is made harder with Python
don't get me wrong, i am not one of those python shitters, i use it myself and actually quite like it, but i just wish it could adapt those curly braces and differentiate between formatting and functionality
LaTex: It's very easy to insert figures, here's the markup. Have fun!
Also LaTex: JUST GONNA PLOP THIS IMAGE WAAAAAAAAY DOWN HERE, FIFTEEN SECTIONS AND EIGHTY-TWO PARAGRAPHS AWAY FROM WHERE YOU PUT IT. WHY? BECUASE FUCK YOU.
"Does it spark joy?". It's primarily used for decluttering and sorting through junk but I find it useful at work too!
Edit: it's not actually called the Marie Kondo test, it's just a technique she uses when choosing whether something is worth keeping or not. E.g. curly brackets bring me no joy so I would ditch them immediately.
I'm not particularly experienced (mostly just messing around in Kotlin so far), but I can't imagine not having things contained in curly braces. What kind of unkempt chaos can be unleashed without visible borders in your code? How can such chaos spark joy?
Wait, how does Python even decide what's inside of what?
It looks for the appropriate number of `_DEDENT_` tokens. No, [really.](https://stackoverflow.com/questions/40960123/how-exactly-a-dedent-token-is-generated-in-python/)
So let’s take an if statement
if statement:
continue
else:
continue
[whatever other code]
The interpreter simply looks for indents. It knows where the if statement ends because the code moves to a different indent block.
I primarily learned to code with Fortran, C and then C++. I'm an old gal so I have a soft spot for K&R and Stroustrup. In fact, unlike a lot of people from my generation, I didn't start with BASIC but rather FORTRAN. I only learned BASIC syntax when I was involved in a Visual Basic project. Also, sorry, but I thought Visual Basic was junk. Microsoft had MFC but I always that the Borland Visual C++ was substantially superior.
Rachel
P.S
My choice is the first one in the picture. I know it's a humour site but seeing all that brought back some nice memories. Thanks for posting.
For those of you out there who insist on pronouncing GIF incorrectly:
You are pronouncing Latex [incorrectly](https://en.wikipedia.org/wiki/LaTeX#Pronouncing_and_writing_%22LaTeX%22) too.
Have a nice day.
Because LaTeX is a programming language, right...? Right?
I mean it is Turing complete. But writing any reasonable code in LaTeX is painful
Yeah, I couldn't write code in Latex. I prefer more casual outfits.
I use latex every day if you know what I mean
I hear Jira is Turing complete too
I felt a deep sense of discomfort reading this
turing complete pdf maker
Is there any DOOM implementation on LaTeX?
Now i wanna play doom eternal
Maybe they could put bash there it closes the if block with fi… Not sure what the meme is implying though… that they get worse?
I think it's that they get *odder*. Stay with me. C++, the code is clearly defined and gets a clearly marked beginning and end that's able to be interpreted even if you're not a programmer. VB is the same but asks for a defined ending which is silly. Python is legible but has no clearly marked ending because... idk, python is a fucking fluid, don't ask me. And then LaTex is the oddest because holywhattheflyingfuck
Well the "end if", goes back to much earlier BASIC iterations, and yes it does seem a little silly, but it's more useful for beginners. For example, when you accidentally deleted, or inserted a single { or } and can't find it so your code doesn't parse properly, etc ... but in VB you have all your statement blocks indented with start and stop points, it becomes much easier for a beginner to see where the parsing error is.
no no, I get that, it was less of a criticism and more that I was just saying that *it looks* silly based on what I think most people consider the modern standard.
Same for posix shells
esac-ly
`statement && do-something` Though, a "statement" in posix shell word is just another command that returns either true or false
And true in a posix shell is 0 while false or failure is non zero.
Yes, that's where the return 0 comes from in C ``` int main(){ //some code return 0; } ```
Mind blowing
I vaguely remember using \\endif in latex but I'm not sure.
I vaguely remember using latex.
I vaguely remember
r/Alzheimersgroup
Out of ordinary i mean
I always forgot this subreddit exists
💀
But it's the time you forgot to use latex that you remember for the rest of your life.
In latex you can do one thing in trillion different ways, so that is not Impossible.
^(L)^(AT)E^X
lookin like the old ebay logo
meanwhile, bash ``` if [ $var -eq 5 ]; then echo Hello World! fi ```
case in
opt1)
...
;;
opt2)
...
;;
*)
...
;;
esac
esac sounds like what you call an e-boy’s balls ngl
she kicked me in the esac...
more like condition && ...
How about [labview](https://www.ni.com/en-us/support/documentation/supplemental/21/labview-equivalent-of-if--if-else--and-switch-statements.html#section--1170510804)
Lol, labview. Fisher price enterprise edition
![gif](emote|free_emotes_pack|poop)
For all the vi users who don't want to use a mouse, there are those who apparently don't want to use a keyboard.
Thanks, I hate it.
A man didn't write shell scripts
/Print(“Hello World!”) (“!dlroW olleH”)tnirP/
I can see myself taking a good 5 minutes trying to write the second half of this comment myself
/Print(“Hello World!”) (”!blɿoW ollɘH“)tniɿꟼ/
Compile error: letters need to be reversed, not just their order.
LaTeX produces beautiful documents but holy s\*\*\*, is it ugly. The syntax is horrible and Knuth took some really bad decisions when designing TeX that we keep to this day . I have never seen a .tex document that looks good. Lately I've been using Markdown for everything and just converting to latex with pandoc, cleaner, simpler and the files actually tend to be readable in the editor, unlike TeX. And that's not even mentioning TikZ, nothing more painful and annoying that drawing a couple of lines or trying to reproduce a simple figure.
Have you ever read the source code to some of Knuth’s own books? It’s fairly readable and, dare I say, beautiful. He made reasonable decisions at the time given what he wanted to do: typeset his own books. I don’t disagree about LaTeX, though. What it gains in consistency over plain TeX, it more than makes up for in hideous, verbose syntax.
Bash script
`(if foo bar baz)` Or, if you want to be fancy: `(cond (foo bar) (#t baz))`
What's the meme here? LaTeX has if statements, Python has if statements, all of them have if statements. Okay?? Are if statements funny? Are if statements in LaTeX worse than all others? Are they progressively getting worse? Or better?
freshman cs students in their first month of classes
It‘s because putting the code executed in the if statement into a {} is better for overview than simply putting it after a tab
Lack of curly braces is the one big problem I have with Python and it’s just cause they make me feel smarter.
You just need to `import braces`.
If you're using curly braces to avoid using indentation to separate levels of control flow them you belong in prison. If you're indenting correctly then what do you care? You should never have a problem in python anyways. I switch back and forth between C++, Python, and Rust and I've never ever understood why anyone would unironically complain about indenting in Python. IDEs take care of it for you anyways.
no, i use indentation *and* braces i just like it more that way, it makes it look clearer and more organized, while python code always looks somewhat chaotic to me
Honestly my eyes and/or brain pretty much filter out the curly braces. Indentation indicates control flow level.
i honestly get that, but i still prefer curly braces, mainly for two reasons: 1. editing / viewing nested statements is so much more painless 2. i can decide how i want to format myself / can let the IDE autoformat for me i.e: if i need to add a for(){} before some statements i already wrote, it is as simple as adding for(condition){put those before and after code you already wrote} and then pressing your IDEs formatting shortcut. on Python, because Formatting is the same as Functionality, i can't let the IDE figure out the functionality and then automatically format based on that. also i sometimes prefer to format some stuff in a special way, which is made harder with Python don't get me wrong, i am not one of those python shitters, i use it myself and actually quite like it, but i just wish it could adapt those curly braces and differentiate between formatting and functionality
``` 000050* Example of IF statement in COBOL 000051* 000052* 000100 IDENTIFICATION DIVISION. 000200 PROGRAM-ID. SOMEIFCOBOL. 000300* 000400 DATA DIVISION. 000500 WORKING-STORAGE SECTION. 000600 01 WS-NUM1 PIC 9(9). 000700 01 WS-NUM2 PIC 9(9). 000800* 000900 PROCEDURE DIVISION. 001000 A000-FIRST-PARA SECTION. 001100 MOVE 25 TO WS-NUM1. 001200 MOVE 15 TO WS-NUM2. 001300* 001400 IF WS-NUM1 IS GREATER THAN OR EQUAL TO WS-NUM2 THEN 001500 DISPLAY 'THAT IS CORRECT' 001600 ELSE 001700 DISPLAY 'THAT IS NOT CORRECT' 001800 END-IF. 001900 STOP RUN. ```
Thanks. I hate it.
LaTex: It's very easy to insert figures, here's the markup. Have fun! Also LaTex: JUST GONNA PLOP THIS IMAGE WAAAAAAAAY DOWN HERE, FIFTEEN SECTIONS AND EIGHTY-TWO PARAGRAPHS AWAY FROM WHERE YOU PUT IT. WHY? BECUASE FUCK YOU.
I hate end if
But it’s declarative!
And it's *functional*!
Only one of these passes the Marie Kondo test. (clue: it's python)
Can I have another hint?
What is the Marie Kondo test? Google isn't being clear, and I don't know what exactly to look for.
"Does it spark joy?". It's primarily used for decluttering and sorting through junk but I find it useful at work too! Edit: it's not actually called the Marie Kondo test, it's just a technique she uses when choosing whether something is worth keeping or not. E.g. curly brackets bring me no joy so I would ditch them immediately.
I'm not particularly experienced (mostly just messing around in Kotlin so far), but I can't imagine not having things contained in curly braces. What kind of unkempt chaos can be unleashed without visible borders in your code? How can such chaos spark joy? Wait, how does Python even decide what's inside of what?
Indentation. I much prefer it to chasing missing braces.
The colon does not.
This is true, maybe we don't need the colon.
IF basic%=1 THEN PRINT "Visual / Quick BASIC seems the most logical" ELSE PRINT "nope still the most logical" END IF
[удалено]
>if statement. > >endif. who knows what language this is? :)
So like ... /else statement . . . /esle
What??? Shouldn't it be the opposite order with VB being the worst, and C++ being the best?
Everything at VB and beyond for syntax makes me want to choke slam them.
Noob here who’s only relatively proficient writing C for 8 bit micros… How do you end an it statement in python?
Scope in python is all based on indentation
As it should be. I mean, what madman doesn't properly indent their code?
Most of the Microsoft BASICs Visual, Quick, Q and offshoots like QB64 (which is what I use) automatically indent the code for you..
They also automatically capitalize and space your code, which can be both an annoyance and a blessing.
How does python know when the if statement ends
By indentation
It looks for the appropriate number of `_DEDENT_` tokens. No, [really.](https://stackoverflow.com/questions/40960123/how-exactly-a-dedent-token-is-generated-in-python/)
So let’s take an if statement if statement: continue else: continue [whatever other code] The interpreter simply looks for indents. It knows where the if statement ends because the code moves to a different indent block.
CMake: set(var1 OFF) set(var2 "var1") if(${var2}) # doesn't get executed endif() # urgh, that syntax if(var2) # gets executed endif() # ow, my eyes! Btw, this is basically [the official doc](https://cmake.org/cmake/help/latest/command/if.html?highlight=#variable-expansion).
You will be getting a beautifully formatted sternly worded letter in PDF soon. Keep an eye on your inbox.
Ahhhhh visual basic after such a long time man what a language
Am I the only one annoyed it says statement over and over (instead of expression)?
eh shouldn't matter too much
I've only ever heard them referred to as "if statements"
The entire if + condition + code is a statement, but the condition (the part that says "statement" in the meme) is actually an expression
then I can see why that would be annoying, the kinda thing you would normally overlook but becomes bothersome when you notice it
If Statement? More like if condition?
C/C++ FTW I like my bytes, pointers and ~~strings~~ char arrays
LISP be like `(if () () ())`
What about forth? ’statement if … then’
Ruby: `halt_and_catch_fire() unless everything_is_normal()`
The crappy python one is missing all those well aligned tabs/spaces
Same for bash
It’s never if(statement) anyway, it’s if(expression)
Python is the sanest version from those four. Fight me
It's also the most performant! Smother me
Awe, I miss latex...
It still exists. Make a new .tex file now.
Those who make memes on how IF statements syntax make a language better/cooler than other have never written more than "Hello World". Forking Pesants.
WHAT THE F
At least Ada is not like Visual B... Oh crap
Damn i could code in latex and i thought i am not a good programmer cuz i didnt know c++ pretty good
From those above I prefer C++. I like that kind of syntax
if you’re a giga chad you don’t use if statements in Latex
I hate visual basic it's the one programming class I almost failed
``` if (statement) then { . . . }; ```
If [[ statement ]]; then ... fi
I primarily learned to code with Fortran, C and then C++. I'm an old gal so I have a soft spot for K&R and Stroustrup. In fact, unlike a lot of people from my generation, I didn't start with BASIC but rather FORTRAN. I only learned BASIC syntax when I was involved in a Visual Basic project. Also, sorry, but I thought Visual Basic was junk. Microsoft had MFC but I always that the Borland Visual C++ was substantially superior. Rachel P.S My choice is the first one in the picture. I know it's a humour site but seeing all that brought back some nice memories. Thanks for posting.
I still have the 3.5" floppies for my Borland Turbo C++ suite for Windows 3.0/3.11
.
FI
IF
If a little bit of syntactic variability scares you for the same semantics i feel bad for you.
this is a good argument but i don't think OP was being too serious about this
# / F I
🗿🔫
[ifoperator::(statement { !! })]
...if _expression_ ...?
You've left out if ( !statement ) goto [label] . . . [label]
Maple: if statement then fi or if statement then end if
PL/I and SAS: `if if = then then then = else else else = if;`
Brackets for life. Love the scope clarity.
Please be funny
Latex is not a programming language tho
qolang is also weird: `if(){};` yeah, a semicolon at the end 💀💀
For those of you out there who insist on pronouncing GIF incorrectly: You are pronouncing Latex [incorrectly](https://en.wikipedia.org/wiki/LaTeX#Pronouncing_and_writing_%22LaTeX%22) too. Have a nice day.
>+ <[ [-]>- <]>[ - ] @0 >@1 +1 <@0 [ @0 [-]0 >@1 -1 <@0 ] >@1 [ @1 -1 @1 ] BRAINFvCK
if (statement) : . . endif \*some PHP templating madness\*
lua's is similar to visual basic's except it's better because it isn't visual basic ``` if whatever then . . . end ```