Earlier quoted context omitted.
> Hacker News really doesn't like PHP. But Y? function Y($F) { $func = function ($f) { return $f($f); }; return $func(function ($f) use($F) { return $F(function ($x) use($f) { $ff = $f($f); return $ff($x); }); }); }
You can write that code in almost any language and it will look bad and be hard to mentally parse.
PHP is much better than what you think
141–150 of 346 posts
Re: PHP is much better than what you think
#142Funny. People criticize PHP the language and the PHP fanboys retort by praising PHP the platform. Jeff Atwood more or less said that we should provide the platform advantages of PHP in other languages in order to steer new developers there.
Re: PHP is much better than what you think
#143I am not convinced. My argument is not that PHP sucks or that anything else. It is rather that PHP is lexically tied to corner-case development. In that case PHP is very good at some things but not really all that great for others. PHP started out as being a pre-processor for SGML documents. All PHP code is contained inside SGML program instruction tags. PHP has never changed this, so however it has developed it is s…
You've heard of PHP SAPIs right? You can most defiantly use PHP outside of a "web environment". I have PHP daemons managing the sending of email and sms, and another used to manage incoming data that is fed into our local database. These have all ran for years (7+) with no issues.
Re: PHP is much better than what you think
#144IMO, more important than the language itself are the frameworks built on the language. Ruby might be _the best_ language ever, but without Rails it wouldn't have gotten famous. It wouldn't have mattered so much that Python is a beautiful language if Django sucked. If a good framework came out of the PHP community, we could forget that "PHP sucks". A good framework which prevented you from doing stupid things would be…
Re: PHP is much better than what you think
#145If people who bash about PHP , had used symfony2 framework, they would have changed their mind to some extent..
Re: PHP is much better than what you think
#146I am so sick of this kind of talk. What language do you like to code in? Really? That's great. Now shut up and go code in it. What difference does it make to you that I use PHP, Ruby or original ASP? My website achieves the result I desire. I chose the programming language I use because of reasons that made sense to me and my project, not because I want the approval of a bunch of hipster start-up kids.
Fabien, though I sometimes disagree with his technical choices, is one of the brightest stars in PHP right now and he's just putting forward a somewhat modest defense of PHP.
Re: PHP is much better than what you think
#147For reference's sake, this article is written by Fabien Potencier, the creator of the symfony framework. This guy's probably single-handedly responsible for lifting the PHP community to a higher level, by making great software (which, when he started, was pretty unique, with horrible hacks-upon-hacks like CakePHP being the norm), and by showing people how to do so.
Indeed a good point, fabien is the catalyst in the current generation of PHP projects, just take a look at Symfony2, Symfony CMF, Silex, Composer, Doctrine, ... they all spawned in the trail of his work. I actually wonder how he gets so much work done.
Re: PHP is much better than what you think
#148People who argue for PHP as a language always brings up this one argument: "PHP gets things done". Great. It get things done. Quick and dirty, but it gets things done. That is all fine and dandy, but what when you need things done proper ? How does it stack up then? Oh. You mean you have to consider input-data as actual text, not as some byte-streams which incidentally maps to the same character-set you used to write…
Re: PHP is much better than what you think
#149I believe that is a flawed statement. I think looking at the number of existing sites and using that as evidence that because there are a large number of PHP websites, the website authors must have made some value judgement at some point on the easiest language available and arrived at PHP, is incorrect. I think the early availability of PHP as a web language, the perception of it as an easy language, and the wide install base drive its adoption.
I helped my brother learn PHP and JavaScript at the same time, my belief (at the time) being that PHP would be the easiest server side language to learn. Watching him struggle to: A) find adequate, modern PHP tutorials, B) see good examples of data structures, and C) understand the division between server side and client side development made me question my decision to have him learn PHP. By comparison, while JavaScript lacked a centralized site (php.net) to educate its users, he was able to find more than enough resources to help get learning fast.
Re: PHP is much better than what you think
#150Earlier quoted context omitted.
Well, we can all dream, but what are you using now do get things done and make a living? I'm pretty sure Python and Ruby fail your criteria. Using the "perfect language" is a luxury that I for one can't afford. I need something that I can use reasonably easy and that is sought by employers. The fact that is has event-driven IO and parallelism (what kind of parallelism do you need for web sites?) is nearly irrelevant.
Yes, Python and Ruby do fail my criteria. Which is why I don't advocate them either. I'm currently using OCaml, but I would probably prefer to use Haskell. They are both far ahead of PHP. Assuming your website is doing anything non-trivial, parallelism would certainly be useful. Just because it's a web project does not mean you're not doing something computationally intensive, after all. But even if you don't need it…
I haven't done any webdev in years, but I am focusing on PHP instead of Python because I have more experience with it and it's easier to relearn. It will be a complement to my main skills which are actually mobile/desktop/embedded dev.