Re: Re: [VOTE]Call for voting: support use list in foreach
| From: | Stas Malyshev | Date: | Mon, 27 Aug 2012 07:27:37 +0000 |
| Subject: | Re: Re: [VOTE]Call for voting: support use list in foreach | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62556@lists.php.net to get a copy of this message | ||
Hi!
> 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.
As a person who used both C and C++ and had to figure out others' code
written in C and C++, my experience is that C code is usually easier to
figure out (unless it's written in some heavily macro-ed style -
remember that C preprocessor is a separate functional language and if
you mix the two you can make some fine mess there) because C++ has tons
of magic you have always to keep in mind. Operator is never just an
operator, assignment is never just an assignment, pointer dereference is
never just a pointer dereference. There's magic in all of that. And
don't get me started on multilevel templates and trying to figure that
out. Of course, C++ gives you a nice means of hiding complexity. But if
you're not careful, you'd hide it in a way that it's still there, but
you are no longer able to figure out where it is. So if somebody thinks
C++ is a panacea here - probably not. Some pieces of Zend Engine are
genuinely complex because they do complex things. I don't think hiding
it behind C++ would help us much. Yes, we'd earn some with making zval
an object, but probably not as much as one would think.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227