Andrew Faulds wrote:

Derick Rethans<der...@php.net>  wrote:
>Nothing shows that they are. In any example I saw, I don't even see any
>
>OO syntax/functionality. For me, "yield" is a core syntax*keyword*,
>and
>hence: no exceptions.
>
I was unware PHP was a purist, non-OOP language. What is "OO syntax" anyway? 
Why can the core not use high-level language constructs too?

Yield is core syntax, but it produces a function returning a generator, which 
is an object, and since Iterators use Exceptions, it would be stupid for 
Generators, which*are*  a class of Iterator, not to.

Actually - shouldn't the discussion on use of Exceptions be sorted out prior to adding them piecemeal into new functions. If I had a vote I'd certainly ask that any implementation of generators respected the 'core' code practices. Iterators are simply an add-on in my design manual and can be avoided - as can yield - but yield is being brought in at a level where it is more invasive?

Error handling is another growing minefield and needs to be tidied up before this sort of creep makes it impossible to remove if that is the preferred option? There needs to be a formal agreement on Exceptions before they are pushed out further.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



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

Reply via email to