I come from a C++ background, and early last year tried my hand at web development. After hearing about all the stuff about how PHP was an "old", kludgey language, I tried to learn python, and go the webpy. It was doable, but I kept running into issues all the time. I gave up and switched to PHP, and I have to say that it was a much easier experience. For the most part, everything just worked. Regardless of how kludg…
PHP needs a vision
141–150 of 182 posts
Re: PHP needs a vision
#142I come from a C++ background, and early last year tried my hand at web development. After hearing about all the stuff about how PHP was an "old", kludgey language, I tried to learn python, and go the webpy. It was doable, but I kept running into issues all the time. I gave up and switched to PHP, and I have to say that it was a much easier experience. For the most part, everything just worked. Regardless of how kludg…
That's the scariest thing about the language. The php will run whatever you write in the script; assuming things, hiding errors, etc..
Re: PHP needs a vision
#143Earlier quoted context omitted.
How is that a fairly strong statement? Here's a much stronger one: PHP is terrible at being a general purpose language. General purpose language doesn't mean you can do things that aren't web dev in it. General purpose means that it is designed to be useful in any application. You know like Ruby, Python, or Perl. General purpose doesn't mean that those things are possible (because I agree that they are possible in PH…
Why is it a crappy tool for non web stuff? It has an absurdly large set of included tools and having all of that in one place is really handy. More concretely- what's an easy non-web task that Ruby (as you suggest learning) is great at that PHP can't handle just as easily? Not trolling here, I'm genuinely curious.
* The bindings for making anything GUI-ish lack. Horribly. I doubt there is one application like an editor written in PHP; that is actually used. * Its long-threads are ... lacking; You cannot write anything deamon-ish in PHP. * Memory management, as Ramus puts it, is not a concern "I just restart Apache". That makes it unusable for anything bigger then a small CLI-tool. * The Cli-libraries are decent, but far from things like Ruby's Thor.
You can write CLI-tools just fine, but "general purpose" is much more then "Managing Web-Content And Some CLI tools".
Re: PHP needs a vision
#144Earlier quoted context omitted.
It's not an "empty, non-contributing comment" to those of us who have had to use PHP, especially after years of using far better languages. It rings especially true to us who have seen the horror systems implemented in PHP can be.
I feel as though we ought to hold our comments to higher standards than "expresses a strong negative opinion with no supporting evidence or reasoning". Maybe that's just me? It certainly feels strange that this sort of comment is being defended when the same comment with PHP replaced by Python/Ruby/(Java/Coffee)script/Haskell/C/C++ would be universally reviled.
It's quite telling that we don't see comments like that for other languages that often, if ever. Aside from perhaps JavaScript, no other mainstream programming language causes experienced programmers so much grief. No other language is so riddled with obvious deficiencies, and so problematic.
Re: PHP needs a vision
#145You want a vision? Here is one - make the mess we have at the moment work. I write in php for the better part of 4 years now and hate it every day. And I have written in c++ before that. Ask 20000 developers what are their main pain grievances sort them by "popularity" and just remove them one by one. For me it is the hard debugging, the include mess and the "extremely" creative ways parsing and runtime errors are co…
Re: PHP needs a vision
#146I'm the first one to admit that PHP has its flaws, but that's not to say that other languages are perfect, or 'better'. PHP is a Frankenstein's monster, and no matter the quality of body parts you schlep onto it, it will probably still work. Ruby on the other hand is stricter, more consistent. If you're new to programming you can hit the ground running with Ruby (especially with the Rails framework, but if you're new to programming, would you even know how a framework relates to a programming language?). But if you want to go beyond a simple CRUD-app, Ruby poses a lot of challenges that can be hard to solve whereas PHP, well, just works.
My point is: you pick the right tool for the right job. For a lot of people, the right tool is PHP because it's the only thing they know. That's not PHP's fault, now is it? This kind of thinking reminds me of the clash between Apple fanboys and Fandroids: to each their merits, but you can't seriously state the one's perfect and the other one is utter rubbish.
Wether you like PHP or not, it's still: a) the most popular programming language b) the programming language with the most job openings (Source: http://www.udemy.com/blog/modern-language-wars/) This has to count for something, right?
So please, for the sake of keeping HN a decent place, refrain from using non-argumented statements like 'PHP must die'. You're not adding anything to the discussion and you make yourself look like a fool.
As for the 'vision of PHP': I'm glad there is none. It's the gateway drug to a lot of programmers, and I'm sure that I would have given up on programming if it weren't for PHP. When I look back on some of the stuff I wrote some 10 years ago I just want to cry, but that does show that I've grown as a programmer. It's perfectly possible for people to start out with PHP and evolve to good programmers, regardless of language used. A stricter defined PHP would just kill that.
Re: PHP needs a vision
#147Earlier quoted context omitted.
"I find nothing" is a fairly strong statement. There are plenty of general purpose scripts one can write in PHP. Also config files don't preclude 'general purpose'. For example, run anything in Java and you'll find out there are plenty of defaults running on the JVM that you can override. Yet no one would argue Java isn't a general purpose language. The fact that PHP keeps these defaults in a file is inconsequential.
How is that a fairly strong statement? Here's a much stronger one: PHP is terrible at being a general purpose language. General purpose language doesn't mean you can do things that aren't web dev in it. General purpose means that it is designed to be useful in any application. You know like Ruby, Python, or Perl. General purpose doesn't mean that those things are possible (because I agree that they are possible in PH…
Re: PHP needs a vision
#148First: Community like HN and such, have lot of good and smart people, however, lots of us are what I like to call "tech hipster", they like to always brag about how they prefer some new-shiny language/framework whatever, as if that means they know more than the average developer. Like an hipster when it comes to some underground-indie-band.
It's pretty fun to see this, I laugh quite a lot TBH. And because of this PHP is looked upon as a mainstream language, like POP music, always number one on the charts, always on the frontpages, but like POP it lacks quality, good taste and so on (what some people think at least).
So, many of us, just hate PHP cause it's POP and using a POP language is cheesy and lame...whatever...and they just hate PHP because they read someone else's saying it sucks. eg: "PHP sucks, because I use X"
Second reason: Other people on the other hand, have really fundamental reasons to dislike PHP, however, I noticed that a lot of these people haven't used PHP since version 4, and they are completely out of the current state of PHP. I don't mean everyone, but most of them do.
I'm not a PHP fan or anything, in my work I have to use it, although I really wish I could use Python, but I can't. So, instead I try my best to use it in the best way I can.
I'm currently using Symfony2 framework, which brings a lot of good web dev practices into PHP world. I'm looking at Laravel as well.
To be, most people still think PHP developers use a PHP as a single file where they put PHP function on the top tof the file and html at the bottom and such...and if you a good developer you can really make PHP shine these days, because there a good tools and frameworks out there.
Re: PHP needs a vision
#149Earlier quoted context omitted.
Are the sort of people writing straight PHP the sort of people who would be using rails? Try a PHP framework like Laravel and then compare that to Rails.
I took a look at that, it appears that you unzip the framework and then start modifying it directly. After you "upload it to your webserver". Deployment? Source Control? No, not in PHP, you just modify shit right on the webserver. I'm sure this process makes upgrading painless, just unzip the framework and... wait... all your changes just got overwritten. This kind of crap is exactly why everyone with a clue laughs a…
You would upgrade your Laravel framework with composer, which runs on Git. And it'll most likely just work without any "Gem hell" that i've come to experience with some other languages.
Re: PHP needs a vision
#150Earlier quoted context omitted.
Or facebook. http://blog.facebook.com/blog.php?post=2356432130
Facebook _doesn't_ run PHP. A large portion of it is coded in PHP, but it runs C++ through HipHop[1]. Facebook may as well be written in anything that compiles down to C++. 1: http://en.wikipedia.org/wiki/HipHop_for_PHP