On Sun, Aug 26, 2012 at 9:22 PM, Rasmus Lerdorf <ras...@lerdorf.com> wrote:
> On 08/26/2012 06:18 PM, Kris Craig wrote:
>> Short of killing ourselves rewriting it in C++, I'm not sure there
>> is an ideal solution to this problem.
>
> Because you think more people can grok C++ than C? That's not my
> experience. C is essentially a subset of C++. Any strong C++ developer
> (I think I have only ever met 2 of those) will know C inside out.
>
> -Rasmus

That's where it gets ugly, in my experience; there are lots of
mediocre C++ developers (and legions of even expert
PHP/JavaScript/Python/Ruby/etc. devs) who couldn't so much as use a
pointer without <insert favorite C++ pointer wrapper here> around to
check their NULLs and do their deletes for them.

LLVM is written in C++, and all that's done is raise the barrier of
entry. C++ enables countless idioms that haven't made it into as
high-level a language as PHP itself because of the potential for
massive abuse (unchecked operator overloads, for one example).

Basically, I expect that going to C++ would do nothing but encourage
less talented people to do much more of the work, and the result would
be a hopeless tangle (what we have now is a tangle, but at least it's
not hopeless).

My intention isn't to turn this into a language flame war, of course,
but if you want to talk about rewriting PHP itself in a language that
doesn't require all the dancing around that C does (with zval, for
example), C++ is hardly the answer unless it's possible to enforce
coding guidelines even more strictly than has already been done. (And
a side note on that, the requirement of C89 standard compliance in PHP
has less and less advantage these days, and handicaps those few
language features in the later flavors of C (C99, gnu99, Clang C,
etc.) which -could- lessen the current unreadability of the code.)

-- Gwynne

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to