News for hackers. Stuff that matters.
Re:PHP needs to die. What will replace it? by jrockway on Monday September 27, 2010 @03:33PM (#1733020)
Perl has pointers? Uh, nope.

Also, how does Perl not have associative arrays? Oh, you mean that vectors and dictionaries are separate types, whereas PHP has one type that does both poorly? Yeah, I'm sure that's why PHP is so popular.

(What is it with people writing about Perl as though they are experts without ever having written a Perl program?)

Re:PHP needs to die. What will replace it? by chromatic on Monday September 27, 2010 @03:45PM (#1733061)
What is it with people writing about Perl as though they are experts without ever having written a Perl program?

I've long believed that some sort of rigorous comparative linguistics education would only benefit programmers. Certainly it could have squelched some of the howlers in this article.

Re:PHP needs to die. What will replace it? by mechanical_fish on Monday September 27, 2010 @04:14PM (#1733198)
What he probably meant to say is:

In Perl, you can pass only one kind of argument to a subroutine: a scalar. To pass any other kind of argument, you need to convert it to a scalar. You do that by passing a reference to it. A reference to anything is a scalar. If you're a C programmer you can think of a reference as a pointer (sort of).

That's from

http://www.troubleshooters.com/codecorn/littperl/perlsub.htm

... which I found because I, unlike the OP, happen to remember that the thing-which-is-sort-of-like-a-pointer-only-not-really in Perl is called a reference.

So let me help the original author: What he meant to say is that "Perl has things that remind me of pointers, but have a different name, and that aren't exactly pointers, but are nearly as confusing as real pointers, especially to someone who just wants to put up a simple web page in five minutes."

Re:PHP needs to die. What will replace it? by jrockway on Tuesday September 28, 2010 @12:01AM (#1734507)
But PHP is just as confusing. When you say:

    foo("bar", "baz", "quux")
and

    foo(array("bar", "baz", "quux"))
you have the same confusion problem as Perl. Except there's no explanation for it at all.

I guess if you don't know anything about programming and never hope to, "Oh, well, uh..." is good enough.

This makes me sad.

Re:PHP needs to die. What will replace it? by seldo on Monday September 27, 2010 @03:43PM (#1733052)
Looking back at my own experience as a newbie developer in 1995, the convenience of PHP was absolutely the reason I picked PHP over perl, and having arrays that could also be dictionaries if I changed my mind was a big part of that.
Re:PHP needs to die. What will replace it? by chromatic on Monday September 27, 2010 @03:47PM (#1733065)
What kind of programs are these where you don't have to rewrite a bunch of other code anyway to account for the difference between keyed and indexed lookups?
Re:PHP needs to die. What will replace it? by neilk on Monday September 27, 2010 @04:10PM (#1733179)
PHP programs.
Re:PHP needs to die. What will replace it? by bobbyi on Monday September 27, 2010 @04:11PM (#1733188)
In 1995, PHP was a set of Perl scripts that Rasmus had just posted on Usenet.