Re:What do hackers think of PHP?
by mdasen on Monday May 05, 2008 @04:16PM
(#181798)
PHP gives you more slack than any other language. . .
which is just enough rope to hang yourself with.
To be honest, part of it will depend on your style and part of it will depend on your discipline.
I'm a fan of Python. PHP is not my style. I like one way of doing things. I like namespaces. I don't like all the extra syntax that I feel is useless ({};$).
But that's just me personally. Many people hate python for those reasons - it's constraining.
Objectively, PHP allows you to do what you want easily. The only problem is that taking those shortcuts can come back to bite you later. If you appropriately use include(), make sure to template out design, and avoid some of those oh-so-irresistible hacky things, you'll be fine. Digg has done well with PHP.
The problem is that it's hard to know exactly where you're screwing up sometimes. For example, in python, every name used in a python source was defined either in that file or in one of the imports. That makes it trivial to figure out why that "I can't find that name" error is occurring. With PHP, that name could be meant to be included 10 files back. They simply all carry over.
So, is PHP bad? I personally think it is, but I'm a little conservative an authoritarian when it comes to programming rather than PHP's more loose style. Can PHP's style help you? Yes.
which is just enough rope to hang yourself with.
To be honest, part of it will depend on your style and part of it will depend on your discipline.
I'm a fan of Python. PHP is not my style. I like one way of doing things. I like namespaces. I don't like all the extra syntax that I feel is useless ({};$).
But that's just me personally. Many people hate python for those reasons - it's constraining.
Objectively, PHP allows you to do what you want easily. The only problem is that taking those shortcuts can come back to bite you later. If you appropriately use include(), make sure to template out design, and avoid some of those oh-so-irresistible hacky things, you'll be fine. Digg has done well with PHP.
The problem is that it's hard to know exactly where you're screwing up sometimes. For example, in python, every name used in a python source was defined either in that file or in one of the imports. That makes it trivial to figure out why that "I can't find that name" error is occurring. With PHP, that name could be meant to be included 10 files back. They simply all carry over.
So, is PHP bad? I personally think it is, but I'm a little conservative an authoritarian when it comes to programming rather than PHP's more loose style. Can PHP's style help you? Yes.