View Single Post
  #85   Report Post  
Posted to uk.d-i-y
Tim Watts[_3_] Tim Watts[_3_] is offline
external usenet poster
 
Posts: 7,434
Default OT - Programming Languages

On 30/01/15 10:34, Tim Streater wrote:
In article , Tim Watts
wrote:

On 29/01/15 22:11, Mike Barnes wrote:

I didn't read that, I just started using PHP. It's important not to get
hung on preconceptions about what a tool should be like, based on tools
you've used before. The author is clearly well up on the theoretical
aspects of language design and implementation, and from that point of
view of course PHP sucks. But it's popular for good reason.


The fact that error handling is completely broken and logging sucks is
not a theoretical problem. It's a very real problem when some broken
arsed PHP stops working on my servers and *I* have to try to debug it.


That's true of any language. I've not had a problem with the error
handling and I do my own logging anyway.

The random string casting is an abomination too - even perl does that
better, despite having the same design goal of "trying to be helpful".


Never had a problem with this. Give some examples.


Both cases are better highlighted in the link I gave a couple of posts back.

Noone is saying *you* can't write good PHP code - if it suits you, good
luck and be happy.

I'm saying it's low bar attracts woolly heading web hackers and then
both gives them plenty of rope to hang themselves AND sets traps to boot.

I would not care, except it's my kind who have to clean up their stinky
mess!

The error logging aspect has always annoyed me even before I had any
other reasons to be prejudiced as it makes my life hell trying to
debug other peoples code.


That just means you're dealing with code from people who haven't
considered the failure modes of their code and what to do when these
failures occur.


See above.

It did also strike me when I actually had to write some that the
naming of stuff was totally inconsistent too.


The naming of a number of library functions is poor, not that I care
too much. More important is that PHP can interface to pretty much
anything you need, databases, the file system, sockets, ...

It's a buggy language ...


Examples please. Development continues and there's an active mailing
list.


All in the link. Inconsistent exception handling is certainly a major
flaw. Things returning NULL as a failure case when they can legitimately
return NULL as a success case on certain input.

And people have the cheek to criticise perl!


As I said in another post, the perl folk are too smart-alec for me. By
contrast I find the docs on the PHP website to be written in a
straightforward and professional manner.


Our language was written by someone who knew languages.