Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"PHP is a kludge made of all sort of functions cluttering the only namespace there is"

Yeah, how many namespaces does C have again? If you were to write a web application in C with all the same open source C libraries as are available for PHP, your only namespace in C would look almost identical.

"While K&R clearly understood the value of separating language from library, PHP deliberately ignores this lesson"

Ironically, this is exactly what made PHP successful. Everything is included in the box. It wouldn't have been half as successful without including every useful library they could find.

"C has a lot of fancy constructs and high-level abstractions: you just have to point the right libraries to the compiler/linker."

You're not going to get closures, classes, meta programming, etc, etc, from libraries in C. And guess what, PHP has libraries too!



"Ironically, this is exactly what made PHP successful. Everything is included in the box. It wouldn't have been half as successful without including every useful library they could find."

I am all in for including interesting stuff, but not at the expense of forcing everything in at once and thus cluttering the only namespace people have to work. While C has only one namespace, you only include the libraries you need.

"You're not going to get closures, classes, meta programming, etc, etc, from libraries in C. And guess what, PHP has libraries too!"

While C has no syntactic support for closures and classes, C programmers learn how to build them from scratch (or use some other person's library to support that - after all, C++ stated as a preprocessor that generated C code). Are you sure you are familiar with C?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: