top | item 935046

(no title)

ilyak | 16 years ago

However I'd say he's directly responsible for the misery the most PHP development now is.

If he actually spent time reading about languages and designing his own, he would throw in function namespacing and function naming conventions and a good built-in abstraction for database access (with a strong bias against SQL injections and towards placeholders/variable binding from the day one), PHP would come out an okayish language and not an universal hate target.

There are some other blunders that he could just not make. And I'm not even dreaming about template system that makes sense now.

He didn't! Who the hell could do that if he wasn't going.

discuss

order

davidw|16 years ago

Maybe if people who spent time knowing a lot about good language design spent some time making their languages practical, we wouldn't be in this situation either;-)

ilyak|16 years ago

Well. Ruby?

kailashbadu|16 years ago

Ramsus wanted to create a simple 'glue' language that was approachable and did the job done without any layers of abstraction that web framework like Zend and Symfony have. And he has stuck to his guns till today.

davidw|16 years ago

Therein lies one of my regrets: Tcl was out there and was already quite a nice 'simple glue language' that to this day remains more powerful and flexible than PHP in some ways. It's too bad the early Tcl/web systems were proprietary until too late:

http://en.wikipedia.org/wiki/AOLserver

ilyak|16 years ago

It would never work without frameworks:

The PHP's default templating (stick code into templates) sucks (unusable for anything serious).

PHP's default routing (/foo/bar.php, lookup the file) sucks (you really really want one entry point for your web app.

PHP's default code layout (one PHP file per page) sucks too.

Idiomatic PHP is unusable! So you'd NEED a framework. Maybe homebrewn one. And if you're going for a framework, why not start with Django or Rails?

Every large-scale project in PHP contains an ad-hoc implementation of at least half of Django.

petervandijck|16 years ago

Blablabla. He may have gotten some details (yes, details) wrong, but he got the important part right: solving a real problem.

ilyak|16 years ago

I'd go ugly early by saying that so did Hitler.

rimantas|16 years ago

Well, we do have PHP5.3 now and it has namespaces as well as PDO.

ilyak|16 years ago

But it still has 1000+ functions in the default namespace?

And every file still starts with <? And if one of them doesn't, then your web app would fail epically because you were gzipping your output into your output stream (one and only one), and this extra space in one of files ruined your gzip.

To be fair, it's wonderful that complex PHP apps ever work. It's a complete surprise to me, I'd say they run-by-accident.