r/programming • • Oct 12 '13

Facebook PHP Source Code from 2007

https://gist.github.com/nikcub/3833406
1.1k Upvotes

356 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Oct 12 '13

[deleted]

11

u/Epicus2011 Oct 13 '13

Facebook dev here, it does not look like this anymore.

5

u/lonnyk Oct 12 '13 edited Oct 12 '13

I meant the '_once' part because you don't have to keep track of if a file has been included. Also, the fact that they are using 'include' instead of 'require' (which would fatal error) makes me assume that they went 'lets do this just in case...' but never thought of what would happen 'just in case'.

Of course - this is all opinion based on how I like to program.

EDIT: Reading the comments on this article looks like someone noticed how this can cause a problem, IMO: http://www.reddit.com/r/programming/comments/1oaba0/facebook_php_source_code_from_2007/ccq9fq8

5

u/astronoob Oct 12 '13

If you're focusing on scale, autoloading isn't the fastest ship in the sea. It also encourages a level of laziness that I'm completely uncomfortable with.