Hacker News new | past | comments | ask | show | jobs | submit login

You can't seriously compare the state of PHP today with the first released version.

You could make such statements about every other mainstream language.




I never compared the state of PHP today with the first released version. I merely used the origins of PHP to argue that PHP was, indeed, more designed for simple web applications than most other general purpose programming languages.

And yes, you can make such statements about every other mainstream language. For instance Perl was more designed for text manipulation than most other general purpose programming languages. Java was more designed for multi-threading than most other general purpose languages. C was more designed for close to the machine programming than most other general purpose languages.

All of these things are true. All of these things still show in various ways. Yet every one of those is a general purpose language that can be used for anything you want.


At least the Lisp guys have figured out how to write parsers and lexers by now. (They even grok lexical scoping.)

I guess we can't blame PHP for preserving the $ in front of variable-names with all the legacy code lying around. But the following should parse in a sane language:

  $width = getimagesize($filename)[0];
Adding support for this would not break legacy code. Nobody can tell me that naming all intermediate results like

  $sizes = getimagesize($img);
  $width = $sizes[0];
is such a preferable style, that the parser should enforce it.

By the way, this is how PHP pretends to support higher order functions:

  function cube($n) {return($n * $n * $n);}
  $a = array(1, 2, 3, 4, 5);
  $b = array_map("cube", $a);




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: