r/Python • • May 03 '14

silly question - do reddit's 'self' posts relate to Python's class self.foo variables?

this dawned on me recently and maybe I'm overthinking :p - reddit was built in Python so even if it is just a naming convention over something implemented it seems like it has similarities.

0 Upvotes

6 comments sorted by

11

u/Rhomboid May 03 '14

Back in the day, there was only one kind of post -- the link post. A trend emerged in those early days of using some garbage value for the link and then putting the text of your post in the first comment, for link posts have no text field other than the headline. The garbage URL value that was commonly used was "self" and it was called making a self post.

Only later did Reddit formalize this by giving the person a choice between a self post and a link post at the submission form. I think there might have been a transition period prior to that where entering a link URL of "self" was specifically recognized as a way of making a self post. And eventually the ability to add body (non-headline) text to a self post was added, but for quite a long time the usual practice remained to put that text in the first comment, which was obviously very awkward.

In summary, I think it has very little to do with Python. The practice of having posts that don't go to a link grew organically out of necessity -- the site was originally designed with all posts as link posts. The idea of a "self" link that didn't lead anywhere external but back to reddit emerged as a way of getting around that and was eventually formalized.

4

u/Veedrac May 03 '14

It's not really that order as far as I can see. A "self post" is a post by oneself. self is the canonical name for an object to reference itself, so it would make sense to term actions by oneself as oneself's actions.

3

u/ca178858 May 03 '14

self is the canonical name for an object to reference itself

Not in all languages. I think 'this' is more common (but thats from memory).

2

u/Veedrac May 03 '14

I meant canonical in Python.

3

u/tdammers May 03 '14

"Self" is kind of a logical choice for something that references itself. Most likely explanation is that it's simply the most reasonable name for either, not that reddit copied it from Python.

1

u/call_me_cookie May 03 '14

I always figured this was the case.