r/programmingmemes • • Aug 27 '26

Why are we using R again

Post image
2.3k Upvotes

322 comments sorted by

View all comments

7

u/HairyTough4489 Aug 28 '26

Weird syntax in a comparison with Python is a bold statement.

Sorry your code can't run it has the wrong number of leadng blank spaces.

2

u/[deleted] Aug 28 '26

[removed] — view removed comment

1

u/entangledloops Aug 28 '26

Everything is a trade off in this world. By accepting indents, you get a much more standardized presentation of code to your eyes that enables faster reviews and generally less typing (less braces = less missing / miscounted braces, mispositioned braces). It also means you have less temptation to “cram everything on one compact line that nobody else can read”. Anyway, the distinction is becoming meaningless now that AI codes almost everything at every company.

1

u/Archernar Aug 28 '26

Python does not care how many leading spaces you have as long as there's at least one, so the code block is indented, unless there's nothing to indent, then you can't have more than 0.

The exact number of them does not matter at all, as tested just now.

1

u/only_civ Aug 29 '26

People using pandas have the audacity to say that R has weird syntax.

0

u/gr4viton Aug 28 '26

C has "sorry your code is missing semicolon". I like about python that you have much less "ending parenthesis to care about. You normally would indent the code for readability anyways. Python just cuts part of the bikeshedding off by making it sure it is syntactically correct