Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

111–120 of 160 posts

Re: PHP needs to die. What will replace it?

#111
the leap from ORM->code generation->magical thinking!! -> IS BAD , just hysterics. A clear example of the slippery slope logical fallacy. Good ORMs are a huge productivity boost and entirely worth it. Those particular PHP coders who barely know programming (keep in mind, this is just a subset of PHP programmers I'm referring to) should not use relational databases at all, they should stick to simple key/value stores - they don't need joins, they don't need subqueries, they've no concept of transactional isolation, foreign what ? Just use a K/V.

Re: PHP needs to die. What will replace it?

#112

One word: deployment To me, the best thing about PHP is that it is so easy to deploy to pretty much any shared hosting on the planet, not to mention really easy to set up on your local machine (with WAMP/MAMP). I love Rails, but on many occasions have built projects in PHP (using a decent framework like Kohana) just because I was putting this on my client's shared hosting account and didn't want to deal with having t…

Yeah, as http://blog.ianbicking.org/2008/01/12/what-php-deployment-ge... spells out in depth.

Re: PHP needs to die. What will replace it?

#113

I get that PHP is not the most elegant language in the World (see kemayo's comment about strpos and in_array for just one example), but I don't understand why people get so worked up over the fact that people use it. It seems like you can't mention PHP without people inferring that you're a lesser programmer or that you clearly don't know what you're doing.

The funny thing is that the second most visited and profitable website in the world (Facebook) is written in PHP... not bad for a "beginners language" i think.

Re: PHP needs to die. What will replace it?

#114
How do the articles from this site always make it onto the HN front page? They're full of misleading information, are only written for the link/flame bait, and don't provide any good actionable advice.

I know news is slow these days, but this kind of posting needs to stop.

Re: PHP needs to die. What will replace it?

#115
post #93

Earlier quoted context omitted.

Lua, really? Could you provide some examples?

No basic string manipulation, only RE-based stuff. One-based indices instead of zero-based.

> No basic string manipulation, only RE-based stuff

It's trivial to write, there are lots of libraries that do this. I've worked on a lot of string processing code in Lua. It's not as easy as Perl or Ruby but it's not by any means hard.

> One-based indices instead of zero-based.

Other than violating the expectations of people used to other C-like languages, this is not in any way even remotely a problem. I don't know anybody who's spent any significant time with Lua who regards this as more than a minor detail.

Re: PHP needs to die. What will replace it?

#116

I've come to expect hackery from this guys blog. The truth is that for professional, skilled developers, mastering their Nth language is an increasingly smaller investment compared to their first. But for people north of HTML coders and south of professionals, they have a lot invested in the scripting skills they've developed and nobody is interested in seeing the value of their investment diminish for a reason like…

Well, it's always hard to respond to a claim about professional, skilled developers, since a programmer will always be looking up at a group that is more skilled (well, most of us anyway).

But I don't think it's a small investment to learn a language and framework. You can learn the basics of ruby, or python, or Java reasonably quickly if you have a reasonably broad background in programming languages, though even that takes a while.

But the frameworks, those really do take an investment. It takes a real investment of time comfortable with Rails or Django. Not to get the initial site or scaffolding up, but to get comfortable enough that you're no longer stymied when you need to do something non-obvious.

And the Java frameworks, oh jeez. To get all that working takes ages. A dependency injection framework, an MVC framework, an ORM, getting it all to work with Maven or some other build too, sheesh that takes a long time, and there are so many dispiriting little errors to chase down.

Well, maybe there really adept coders just don't have a problem with this, but I have this suspicion that it doesn't come down to being smart. This isn't about mastering some difficult algorithm and then implementing it in python or ruby instead of java. There are a lot of idiosyncrasies.

I remember Ellen Ullman (she wrote "Close to the Machine", a reflection on programming before these types of books were so common) described programmers as "serial monogomists", becoming very loyal to their environments for a while, then abandoning them and finding something new. I remember another line, about how you can be a senior developer in one environment but not even know how to turn the machine on in another.

I'm not saying there aren't people who can switch easily, but I do think it comes at a cost, even for people who are reasonably adept programmers.

Re: PHP needs to die. What will replace it?

#117
I switched to Groovy/Grails (srsly, why people choose ruby and rails over it?) and I'm so happy with it: it's fast not only in terms of application performance, but also in terms of time to develop applications on grails. It has everything and even more than php can offer thanks to java background, it's also safe and very well documented.

Re: PHP needs to die. What will replace it?

#118
This past weekend, for the fun of it, I setup MongoDB and Node.js on Windows. After ~3 hours of downloading, reading MongoDB and Node.js example docs, and looking up some config issues on StackOverflow, I had written a small TODO list app. Last night, in about 45 minutes, I setup CoffeeScript and translated my node.js webserver into CoffeeScript, resulting in about 25% fewer lines of code.

This is by far one of the easiest stack deployments I've ever done. I'm even thinking about writing a push-button windows installer to do all the installation and configuration stuff for me in the future. If there is any interest, I'll share it.

And heck, couple those technologies with jQuery, and I imagine that you could use CoffeeScript to develop for both the server and client side of a web app.

Easy and way cool.

Re: PHP needs to die. What will replace it?

#119

I really really think this is asking the wrong question. Sure PHP beat perl at its own game, and really was the master of the CGI style web. But the thing is, that really isn't where the world is anymore. Sure, there is a place for building pages from templates, particularly in piecing together custom splash pages and whatnot, or xml feeds, but honestly, the CGI style web is just going away. Look at what everyone is…

My thoughts exactly as I was reading the post :-)

Re: PHP needs to die. What will replace it?

#120
post #103

PHP is a nightmare, but only once you learn enough about programming or development to understand what you should really be doing, and only once you've seen how other languages do it. After that comes PHP's special flavour of OOP. I'd prefer to call it 'Do Whatever The Fuck You Like Orientated Programming' given the abundance of 'magic methods' and other functions that try really hard to make sure you've got a cheeky…

> It's so loose and care-free that it doesn't care what you do or how you do it. This is precisely why I fell in love with PHP. My first was BASIC, my second was C, my third was Java, but my fourth ... oh god ... like that slutty girl who will let you do absolutely anything. How can you not fall in love with that?

All I can really say is that I'm getting fed up of it. In keeping with your analogy, I'd certainly prefer one that gave me the odd slap and told me to get my shit together if I tried pushing my luck.

(programming languages and sado-masochistic tendencies would be an interesting avenue to explore...)

Post reply on HN