The overall mood seems to be that since PHP has an error handler, everyone is
free to handle errors any way they want.
Everyone is surprisingly ignoring the two giant holes in that theory:
1) PHP Errors come with a severity code and a string message. You want to
handle specific errors in a
Hi!
Have you stopped for a moment to think this opinion through? Look at two
Of course not. Why would I bother thinking? It is always safe to assume
nobody thinks before writing anything to the list.
typical patterns of error handling. The examples below are generalized from
my file cache
You are either purposefully exaggerating or not doing it right.
if(fileop1() fileop2() fileop3()) {
// do valid stuff
} else {
// do error stuff
}
It's not that hard.
I guess it was my mistake that I simplified my actual code for simplicity's
sake. Please show me how would my actual code
I know PHP's model is all messed up, but no one here, I believe, is
asking about putting non-error log messages in Exceptions. IO failure is
an exception.
If your IO operation fails, you can't just log it and plow forward
blissfully without handling the problem.
Stan
Exceptions allow
-Original Message-
From: Andrew Faulds [mailto:a...@ajf.me]
Sent: 25 July 2012 18:03
[...]
Fact: Adding a new name for a special kind of function as a syntax
construct is going to cost (possibly unnecessary) time and energy,
because now you have functions, and weird things that
Whats the status of 5.3? I have some changes that need to get into a
couple of the xml based extensions in order for them to work with the
next libxml2 release next month. Should I be putting these into 5.3 as well?
Rob
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe,
On Thu, Aug 9, 2012 at 8:51 AM, Rob Richards rricha...@cdatazone.org wrote:
Whats the status of 5.3? I have some changes that need to get into a couple
of the xml based extensions in order for them to work with the next libxml2
release next month. Should I be putting these into 5.3 as well?
On 08/09/2012 11:10 AM, Levi Morrison wrote:
On Thu, Aug 9, 2012 at 8:51 AM, Rob Richards rricha...@cdatazone.org wrote:
Whats the status of 5.3? I have some changes that need to get into a couple
of the xml based extensions in order for them to work with the next libxml2
release next month.
Rasmus Lerdorf wrote:
On 08/09/2012 11:10 AM, Levi Morrison wrote:
On Thu, Aug 9, 2012 at 8:51 AM, Rob Richardsrricha...@cdatazone.org wrote:
Whats the status of 5.3? I have some changes that need to get into a couple
of the xml based extensions in order for them to work with the next libxml2
On Wed, Aug 8, 2012 at 10:55 PM, Andrew Faulds a...@ajf.me wrote:
Hmm. This is just a quick thought:
Considering the yield syntax will vary about needing () round it, why not
make it a fake function (language construct).
This way it's consistent: yield(), yield($v), yield($k = $v), $a =
On 09/08/12 16:58, Nikita Popov wrote:
On Wed, Aug 8, 2012 at 10:55 PM, Andrew Faulds a...@ajf.me wrote:
Hmm. This is just a quick thought:
Considering the yield syntax will vary about needing () round it, why not
make it a fake function (language construct).
This way it's consistent:
On 08/09/2012 11:31 AM, Lester Caine wrote:
Rasmus Lerdorf wrote:
On 08/09/2012 11:10 AM, Levi Morrison wrote:
On Thu, Aug 9, 2012 at 8:51 AM, Rob
Richardsrricha...@cdatazone.org wrote:
Whats the status of 5.3? I have some changes that need to get into
a couple
of the xml based extensions
On Thu, Aug 9, 2012 at 5:59 PM, Andrew Faulds a...@ajf.me wrote:
yield(), so far as the programmer is concerned, might as well be a function.
It isn't, strictly speaking, but like other function calls, it suspends
execution of the function until the called function completes.
So I don't think
On 8/9/12 12:01 PM, Rasmus Lerdorf wrote:
On 08/09/2012 11:31 AM, Lester Caine wrote:
Rasmus Lerdorf wrote:
On 08/09/2012 11:10 AM, Levi Morrison wrote:
On Thu, Aug 9, 2012 at 8:51 AM, Rob
Richardsrricha...@cdatazone.org wrote:
Whats the status of 5.3? I have some changes that need to get
Also, currently yield looks very similar to return and I think this is
a nice thing as it is similar semantically. yield($foo) would give it
different semantics, imho.
I love this point a lot. Return is very common and yield is some kind of return.
--
PHP Internals - PHP Runtime
Mike Ford wrote:
The signposting needn't even be as in-your-face as a generator
keyword (either instead of or in addition to function): I could get
behind a variation such as:
function f($x, $y) yields { ... yield $z; ... }
Or even (stretching a bit to re-use an existing keyword!):
hakre wrote:
Also, currently yield looks very similar to return and I think this
is a nice thing as it is similar semantically. yield($foo) would
give it different semantics, imho.
I love this point a lot. Return is very common and yield is some
kind of return.
I agree also: yield behaves
17 matches
Mail list logo