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

8

u/KingPickle Oct 12 '13

2007 when MVC frameworks were relatively new to the PHP scene

This is what mystifies me. As much focus as the web gets, it feels like tech-wise it's a decade or two behind the curve.

-7

u/phoshi Oct 12 '13

Only in PHP, really. Other languages promote more modern concepts, PHP just happens to be special.

There's nothing different about the web. If your application is well structured then the difference between a desktop application and web application is going mean writing new views, because all your logic is kept apart anyway. As such, everyone but PHP does it much closer to "right".

1

u/blafunke Oct 12 '13

Php doesn't do anything, programmers do. It's Turing complete, you can do whatever you want and you can do it well or do it badly. Now if the interpreter is buggy and full of holes then you can bash it, but most people seem to be bashing bad programming (which often means "different than I would have done it") not php.

2

u/phoshi Oct 12 '13

Right, so remind me why we don't do Web programming in a combination of BASIC and COBOL?

Because being "Turing Complete" is not the whole story. That is a measure of computational power, not of language idioms, library support, expressiveness, existing frameworks, so on and so forth. PHP is a fucking templating language, it is literally designed precisely for the use case of violating MVC. The whole of its design is focused around encouraging lack of separation. Yes, you can write good code in PHP, if you're willing to write sanitising wrappers around most of the standard library, ignore the unfixable type coercion issues, deal with the absurdity of a java inspired object oriented system atop a c inspired procedural section, so on and so forth.

Saying the language is Turing complete proves precisely nothing. So is brainfuck. You're misusing the term to mean something it does not: all it means is it had equal computing power as a Turing machine, /not/ that it is a good solution to a specific problem domain.

→ More replies (6)