"Tom Worster" wrote in message news:571267b4.9070...@thefsb.org...
On 4/16/16 5:04 AM, Tony Marston wrote:
"Marco Pivetta" wrote in message
news:CADyq6sJfPYgQvhQt=uvcbqkoojjoupcz1sufzwxc+55hl0p...@mail.gmail.com...
Tony, that sounds really like "real programmers use `dd -if -of`".
Please
stop with that argument, as it really doesn't reflect reality.
That is not what I said. As a follower of the KISS principle I believe
that good programmers write simple code that anyone can understand, while
less-than-good programmers write complex code that only a select
few can understand.
...or perhaps nobody can understand. Agreed. So I guess that makes me
a follower of the KISS principle too. I prefer boring, obvious,
conventional code and the kind of strict style guides that artisan codes
hate. I'm also conservative wrt changing PHP -- a gradualist. And I dislike
arguments proposing feature X because such-and-such more fashionable
language has it.
That said...
I have found that my programs, my team's and the libs I use are more
obvious, boring and easy to understand when they are clear about type.
So in recent years I've tried to be more and more rigorous in using PHPdoc2
type tags, the IDE's linters to run static checks, and working towards
eliminating using "mixed" and "|" in the type spec.
PHP 7.0's type is better than relying on conventional annotations that
evolved from a doc generator. I like these specific "shiny new features".
I believe that being stricter with type has helped reduce the rate at which
we introduce bugs. It's been totally worth it. As I see it, I can't afford
not to.
So I don't like Union Type because it will encourage sloppy type in libs
that I might otherwise want to use. I don't want nullable hints for the
same reason. With some reluctance and acknowledging the inconsistency I
*do* advocate nullable return because eliminating something or null from
PHP conventions seems a stretch and I'd rather these were declared than
not. That's just my position.
I don't think I'm behaving like an academic researcher or computer
scientist with a PhD. I prefer to see myself as a practical computer
programmer with a deep concern for long term maintenance of my programs.
> The problem with adding all these new and shiny features ...
> only for the benefit of the few who think programming should be
> restricted to those who have Phd's.
I see two problems with arguing along these lines. 1. It's not specific
enough. 2. It's a bit insulting both to me and, I imagine, to academics.
Where is the insult in what I wrote?
So please try to be more specific about both what you want and why. At the
moment you appear to be arguing against any change to PHP and justifying
this with the argument that anyone who wants to change it is an incompetent
programmer.
Where did I ever use the word "incompetent"?
You are reading what isn't there.
--
Tony Marston
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php