Hacker News new | ask | show | jobs
by TheAnimus 4746 days ago
I sort of agree with you, but then I come at it from the view point of why choose PHP? Myself, I can't think of a single awnser, but then again I'm the kind of person who learns a programing language or paradigm for fun.

However there is an elephant in the room with PHP, it has, quite frankly some terrible creations made by it. In much the same way MS had a whole bunch of technologies around DCOM and the like which suddenly found themselves disabled and strongly advised against use in XP SP2. I think PHP really does need to try and clean up its image.

The whole 'lets go find some sql injection vulns on github' game demonstrates many people still use the tool badly.

At what point does someone say, that they should re-design the tool, so that they encourage better use.

I'll be honest, if I hear someone say "we're using php for this" I assume its just because they are ignorant of other languages. I can't think of any problem I've been faced with, where PHP is the best solution.

So ultimately, if your going to try and remove stuff, why bother, you'll only break the existing projects, rather than improve them. The best thing is to treat the language as depreciated.

3 comments

> I think PHP really does need to try and clean up its image.

Sorry, but you obviously have not been taking notice over the past year or two. PHP really has been cleaning up its image. Go have a look at PHP-FIG, composer and packagist for starters.

Yes, there are problems. Yes, some/most may think that there are better solutions. But to think that PHP has not been "cleaning up its image" is just wrong.

>Sorry, but you obviously have not been taking notice over the past year or two.

I'll admit, I haven't really, because I'll turn it round, why would I?

We've seen Erlang start to be used quite a lot, Scala is becoming very interesting, and F# is appearing suitably mainstreme.

What features would make me think "hmm, I should check out what they are doing in PHP"?

Looking now I still see a cluttered array of APIs, some pretending they are C from the 80s, others hinting that they at least knew of objects in their design.

A quick look for static analysis rule systems for say our CI system: http://mark-story.com/posts/view/static-analysis-tools-for-p...

Wow, that's pretty poor.

What I do again see, are PHP developers who are not fluent in any other language. I always find that odd. For instance I've been doing mostly C# since version 2. But I would probably pass most Java or CamL interview questions anyone had. I am happy in C# knowing what I am missing from other languages (well, not happy, just its the right choice for the things I've been doing).

In short, PHP has an image problem with plenty of people. I am one of them. They can't easily solve it, without breaking a whole bunch of existing code, as most of my complaints are inherent languages features and core API design (or lack there off). I don't nock languages that eschew OO, but I do nock ones that implement it, just very, very badly.

>We've seen Erlang start to be used quite a lot, Scala is becoming very interesting, and F# is appearing suitably mainstream

Your definition of mainstream must differ from the dictionary's.

>Your definition of mainstream must differ from the dictionary's.

I have got the same two agents constantly bugging me "oh you know some Erlang right?" at the moment, but the only one that I begin to describe as mainstream is F#.

If your in any kind of LOB space which deals with 'Maths' F# is rampant now. Which is handy for me, as I used to instruct labs on OCaml at uni.

Just using www.inqjobs.co.uk looking in London for contract rates on 500pd+ I find over 20 roles for F#. Compare that to the Python or Ruby number.

That to me, is mainstream. Not quite Java/C++/C# league, but certainly out there.

My biggest problem with PHP is that I was never able to find a good framework for it. After I found Laravel I started liking it a lot more.
From an engineering perspective you're probably correct. However, from a commercial perspective (be it long-term support, business continuity, cost of developers/support) PHP is one of the best solutions.
Well actually I don't use PHP that much anymore, but I do keep an eye on it; there's been a lot of improvements, mostly on the ecosystem side. It's definitely not my language of choice, but one still has to eat, and PHP jobs are unfortunately way more common than most other stacks around here, outside of the enterprise stuff which I'm currently doing.