News for hackers. Stuff that matters.
Re:PHP introduces "goto" by weavejester on Tuesday June 09, 2009 @07:38PM (#650226)
> PHP is not any worse or better than any other language.

I disagree. Consider the following PHP:

    function inc_all($i, $xs) {
        array_map($xs, function($x) use ($i) { return $x + $i; });
    }
And compare it to the equivalent in, for instance, Haskell:

    inc_all i = map (+ i)
Most languages can express the same concepts as PHP, but can do so much more clearly and concisely. The criticism of PHP is deserved: it's a very badly designed language.
Re:PHP introduces "goto" by ars on Tuesday June 09, 2009 @09:29PM (#650365)
Haskell is a functional language, PHP is not. So it's not a valid comparison.

Every time I ask people what's wrong with PHP they give me answers from functional languages. I've yet to see anyone give me an example from a procedural language.

Re:PHP introduces "goto" by jamesbritt on Wednesday June 10, 2009 @01:05AM (#650601)
"PHP is not any worse or better than any other language."

Haskell fits as "any other".

"Haskell is a functional language, PHP is not. So it's not a valid comparison."

So, PHP is not any worse or better than any other language that's just like PHP?

Re:PHP introduces "goto" by psygnisfive on Wednesday June 10, 2009 @12:40AM (#650586)
You're right. Let's compare to a more adequate language. Like Ruby.

  def inc_all(i, xs)
    xs.map { |x| x + i }
  end
Re:PHP introduces "goto" by lhorie on Wednesday June 10, 2009 @12:23PM (#651250)
> PHP is not any worse or better than any other language.

I also disagree, but in the sense that PHP is both better and worse than other languages, depending on your metrics. I feel that talking about code terseness is weird if it takes more effort to actually complete whatever project you're working on (due to lack of libraries, less active community, what have you).