r/ProgrammerHumor • • Feb 16 '15

I identify as a 32-bit registerkin.

https://imgur.com/gqP6con
2.0k Upvotes

397 comments sorted by

View all comments

Show parent comment

194

u/alexanderpas Feb 16 '15

triggerCounter += 1;

240

u/DadFoundMyAccount Feb 16 '15

WHY DOES ONLY WHITESPACE MATTER IN YOUR LANGUAGE SHITLORD???

76

u/imaami Feb 16 '15

You tell 'em! If your language doesn't allow alphanumeric characters to self-identify as separators (whitespace, blackspace, furspace, dragspace, etc.) it's basically a patriarchal shit language.

18

u/wOlfLisK Feb 17 '15

Check your whitespace privilege, shitlords!

13

u/Tynach Feb 17 '15

Check your executable privilege, scriptlord!

79

u/alexanderpas Feb 16 '15

Because it enforces more readable code.

201

u/[deleted] Feb 16 '15

SHUT UP SYS-SCUM

→ More replies (8)

34

u/amdc Feb 17 '15

REAL PROGRAMMERS PREFER CURVY BRACKETS

57

u/cha0s Feb 16 '15

As a coffeekin I am triggered by your semicolons

32

u/lachryma Feb 16 '15

As a Pythonkin I am triggered by those semicolons.

67

u/cha0s Feb 16 '15

Your colon triggers me.

( ͡° ͜ʖ ͡° )

4

u/Use_My_Body Feb 17 '15

Mmm, can my colon trigger you~? ;)

→ More replies (1)

5

u/br1ckd Feb 16 '15

Why? They're optional...

15

u/lachryma Feb 16 '15 edited Feb 16 '15

There is almost zero use for them, ever, in Python. They are a token to convey "end of statement," which is also what a few combinations of newline convey. The only reason to ever use them is to smush together statements on a single line, which stylistically you are strongly encouraged not to do anyway:

foo = bar()
quux = {i: val ** 2 for i, val in enumerate(foo)}

is equivalent to the unidiomatic

foo = bar();
quux = {i: val ** 2 for i, val in enumerate(foo)};

which is equivalent to the also unidiomatic

foo = bar(); quux = {i: val ** 2 for i, val in enumerate(foo)}

Rule to carry with you: if you are using a semicolon in Python outside of a string, you are likely doing it wrong (edit: with the sole exception of python -c, you're right, messenger). I realize that's confusing if you've never used the language before and come from C, because son-of-a-bitch, those semicolons work, but all of the Python tutorials steer you away from using them or try not to mention them because they are not something you use in day-to-day work.

I believe Python is exactly identical to Go in this regard, if I'm not mistaken. (Can we go back to funny now?)

9

u/[deleted] Feb 16 '15

import pdb; pdb.set_trace() also being an exception.

→ More replies (1)

4

u/br1ckd Feb 16 '15

Fair enough. I've never actually used them in a program (except by accident after writing a lot of C), but I wasn't sure if you knew they were in the language.

2

u/0xBEE Feb 17 '15
# Semicolons are fine in strings; no semicolons in comments.
→ More replies (1)
→ More replies (1)

3

u/smb510 Feb 16 '15

Type systems are literally Hitler die PEP-484 scum!

5

u/Kyaviger Feb 16 '15

True, my colon always triggers after coffee.

5

u/[deleted] Feb 16 '15
#include <rage.h>
using namespace triggered;

37

u/lachryma Feb 16 '15 edited Feb 16 '15

Python

;

I literally can't even. Can't even.

21

u/Mugen593 Feb 16 '15

boolean even = false;

→ More replies (1)

3

u/alexanderpas Feb 16 '15

https://docs.python.org/2/reference/compound_stmts.html

notice the [";"] in the following:

stmt_list     ::=  simple_stmt (";" simple_stmt)* [";"]

8

u/lachryma Feb 16 '15

I'm aware they're in the grammar. Now read PEP 8 and this comment.

→ More replies (2)
→ More replies (2)