Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

scrottie (4167)


My email address is Spam me harder! *moan*

Journal of scrottie (4167)

Thursday July 02, 2009
04:01 PM

Explaining why not PHP

[ #39214 ]

Some times people come to me wanting to learn to program. Often we have this same discussion -- they want to learn PHP "because it's easy", and I want them to learn anything but. Seriously -- Java, JavaScript, Python, Ruby, C#, Haskell, Forth, Objective-C, Pike, Scheme... there are a million good languages to learn and PHP is not one. Oh, but it's easy!

There are two ways of thinking here. Either the world is a large, interesting place full of things you can learn. The stories have plots and twists and surprises that astonish and humble you. You have to grow to take it all in. Smart people play leading roles in the drama.

Or else everything is exactly as you expect it. There are no surprises. You can't get lost. No one is any smarter than you and even though you're a novice, no one really has any experience with what happens when things get complex because they just never do.

The first is the stuff of Hemmingway.

The second is preschool and old lady tour buses. It's for the proud who are afraid of their own weaknesses and risking not only defeat but fear any struggle. It's a cynical attitude that thinks little of the world and other humans. It's the wife who tells you what she wants for every birthday and anniversary. It's lost opportunity, low expectations, and narrow horizons.

Yes, the world is big and scary. Yes, it's full of surprises. Yes, smart people make you feel dumb, and there's a lot there for you to learn, at some pace. Don't pretend like there isn't. It all makes for a great story... a wonderful adventure. Don't fear it.

Logo, the old programming language for "turtle graphics", where you steer and move a line drawing cursor, is an old Lisp dialect but without all of the parenthesis. BASIC on the other hand is pointlessly limited for anything but the underpowered shared computer it was written for at Dartmouth. Would you continue to write BASIC when Logo is just as easy? Do you want your confined space to be that much smaller than necessary? Likewise, learning Ruby is no harder than learning PHP but far, far more rewarding. I'm not dissing Perl here; Perl does have a longer learning curve than most languages.

PHP does not make programming simpler. It just pretends that programming is simpler than it is, just as a tour bus doesn't make Italy more easy to experience, it just lets you pretend that you're experiencing Italy.


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I was vexed for a long time about PHP, how the hell could anything so patently dangerous and backwards (code inside template? huh?) be so popular.

    What PHP did right, when everyone else did it wrong, was to make the "first hour" of your PHP experience utterly effortless.

    When I first tried to do a website, PHP didn't really exist, and so I ended up learning CGI. And it took me almost an entire day to get it to work, with a weird little webserver running on Windows, and a little ActivePerl install, and a lot o

    • It’s amazing only if you are also amazed that the most successful programming environment in the world is Excel.

      • Yes, I still find that amazing as well.

        • I don’t. There are a lot more people out there who don’t think of themselves as programmers but who have needs that can be served by a little bit of a programming. (And yes, a little bit of programming is very much like a little bit of knowledge…) Lowering the barrier for these people is a genuinely good thing, even though the means by which this is achieved may be less than suboptimal from the perspective of “real programmers”, and thence we enter classic worse is better terri