View Single Post
  #83   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:05, Mike Barnes wrote:

While mulling over the topic last night I came to the conclusion that
PHP places a lot more responsibility on the programmer than most
language environments, which is what you seem to be saying to some
extent. As an experienced (started in 1962) coder I find it refreshingly
trusting.

Somewhat paradoxically I think PHP might be a good language for a
beginner because it usually does *something* even if it's not what you
thought you'd told it to do. Its anarchic nature means an absence of
off-putting bureaucracy such as you find in VB. When the beginner gets a
bit more experience he's more likely to be more tolerant of an
environment in which a program refuses to do *anything* unless you've
dotted all the "i"s and crossed all the "t"s.


This is I think the nub of the whole problem.

PHP is very accessible - which makes it attractive to "web hackers" as
opposed to full time coders who know their craft (not trying to put you
or anyone here in any particular box!)

Unfortunately this makes it the last language that should place any
responsibility on the hacker to do the right thing The two concepts
are very much at odds.

I approve of an accessible web language, but it needs to be robust and
make the hacker do the right thing (or blow up, but in a helpful way).
Otherwise you get half arsed hackers writing full blown web apps that
are full of security holes.

I'm not saying the language should raise the bar and exclude web hackers
- they have given us many useful things that hard core coders might not
have been bothered ever to do - but the language really needs to coerce
them to write solid code.

You can't stop a total n00b from writing crap, but you can hand out the
rope in short enough sections so they can't hang themselves


And people have the check to criticise perl!


No language is above criticism. I like perl but have totally converted
to PHP for new projects, and I translate old perl to PHP from time to
time. For your peace of mind I should add that these are all personal
projects and it's a quarter-century since I wrote anything that I
expected anyone else to maintain (or even look at).


I still write useful 1 page CGIs in perl. But if I had to, I would use
python for more complex web stuff as do all my colleagues. In fact I am
learning python and some django (web app thingy based on python). I've
only ranted against pythons stupid indenting ********, but in every
other respect it looks like a very clean and fine language.