3 ms·
there's no such thing a blub programming languages, only blub programmers There is such thing as blub languages, and the tragedy is that these languages attrac
by mojuba 20y ago
there's no such thing a blub programming languages, only blub programmers
There is such thing as blub languages, and the tragedy is that these languages attract blub programmers, or even worse, allow "blub" people to become programmers :)
PHP is efficient
As long as it resolves symbols (variable and function names) at run-time instead of compile-time, it can't be efficient. Unfortunately the language itself implies this behavior so it can't be changed.
PHP is maintainable
It took me years to figure how to write really nice and maintainable PHP code. There are some forgotten languages out there, like Turbo Pascal, which forced you to write maintainable code from the beginning. They taught you to think of interface/implementation relationships all the time.
PHP has good support of OOP
Screw OOP, pardon my language. It gives nothing but an illusion of maintainability, while in reality you end up with a bloated code that otherwise could have been X times smaller.
PHP is straight-forward and easy to learn
No programming language is straight-forward unless you know all internals. It can be quite straight-forward to learn array manipulation in the manuals, but much harder to understand the cost of each of those methods.
Only good thing about PHP is that it's a dynamic language with dynamic strings and lists/arrays, it is embedded (in HTML) and is largely supported. And that's all you need for server programming on the Web.
- sajidu 20y agoThere is such thing as blub languages But PHP is not one of them, it's perfectly suited for the web. I personally find it easier to identify blub programmers than blub languages ... As long as it resolves symbols (variable and function names) at run-time instead of compile-time, it can't be efficient. That includes all dynamic languages i.e. Lisp, Ruby, Python, Perl, Smalltalk, JavaScript, Eiffel, Erlang, Forth, Lua et al. No programming language is straight-forward unless you know all internals. True, but as you say, that applies to any language. PHP is a very easy language for novices to pick up. OOP ... gives nothing but an illusion of maintainability, while in reality you end up In my experience OO code tends to be easier to maintain, and so long as you don't over do it, efficient. Only good thing about PHP is that it's a dynamic language with dynamic strings and lists/arrays, it is embedded (in HTML) and is largely supported. And that's all you need for server programming on the Web. That's why I recommended it as a good choice for web programming.
- mojuba 20y agoThat includes all dynamic languages i.e. Lisp, Ruby, Python, Perl, Smalltalk, JavaScript, Eiffel, Erlang, Forth, Lua et al. Ok, but you said PHP is efficient. I say, PHP is efficient as much as the language itself allows it to be. If there are many late-binding languages around and PHP at least doesn't look bad compared to them, it doesn't mean it's efficient. Late-binding offers some new possibilities in programming of course, but the price is high and programmers should be aware of that. And when it comes to computationally intensive tasks (encryption, graphics, any hardware-related task), you can't trust programmers who are entirely into dynamic languages, no matter what they say about their favorite ones. That's why I recommended it as a good choice for web programming. What other languages do you master as much as PHP?
- sajidu 20y agoC and JavaScript. I worked with Perl before PHP but never grew to like it (it's not consistent enough and not exactly easy on the eyes, either). I do understand the tradeoff between efficiency and power, and PHP hits that sweet spot just right for web programming. Worrying _too_ much about language efficiency when it comes to web programming is clearly a case of premature optimisation. PHP is efficient enough (probably Perl and Python as well, maybe not Ruby ?).
- mojuba 19y agoWorrying _too_ much about language efficiency when it comes to web programming is clearly a case of premature optimisation. Well, sometimes it's a question of a choice between upgrading your hardware and optimizing your code (or even re-writing in some other language). Which is cheaper? I'm into it right now, haven't decided yet ;)