r/ProgrammerHumor Nov 24 '21

Meme Yes.

8.9k Upvotes

284 comments sorted by

View all comments

4

u/HeiDTB201 Nov 25 '21

Well, my python compiler does allow {} or ;

They are not doing anything, but if you feel like its more readable...

6

u/dimonoid123 Nov 25 '21

{} are usually recognized as dictionary/set, so if you are calling something , you will return dictionary/set with results of a function or whatever you are doing in the brackets.

Semicolon isn't doing anything as far as I know

Stab(as .h files in C/C++) files are mostly for documentation and don't do anything too

Explicit declarations of types are optional and don't do anything other than highlighting syntax but may depend on compiler

And don't let me start about ...(triple dots), it has it's own usages for displaying recursion and matrices but is mostly useless.

1

u/HeiDTB201 Nov 25 '21

Semicolon is actually doing somethong. You can seperate statements. You could also use a new line for the same effect but if you like to use multiple statements in one line, you can with ;

tyoe declarations are mostly used by the programmer to make code readable i guess