On Fri, May 3, 2013 at 2:08 AM, Sherif Ramadan wrote:
> It's already possible to do so now without any modifications to the core:
It was already possible to declare arrays, but the new, shorter array
syntax still brings a smile to my face :) Few new language features
actually add things that were
On Fri, May 3, 2013 at 1:25 AM, Adam Jon Richardson wrote:
>
>
> Currently, sure. Limiting this functionality to the return statement
> seems doable.
>
It's already possible to do so now without any modifications to the core:
function myFunc() {
$result = array(null, null);
if ($failureCa
On Thu, May 2, 2013 at 11:44 PM, Sherif Ramadan wrote:
>
> Just to clarify, PHP doesn't offer two separate approaches of handling
> errors. We need to first distinguish between what is meant by a the terms
> "Errors" and "Exceptions" so that we don't throw around ambigous claims
> here. PHP has an
On Thu, May 2, 2013 at 6:00 PM, Adam Jon Richardson wrote:
> PHP currently has two separate approaches to handling errors:
> - Errors
> - Exceptions
>
> Both have their issues.
>
>
Just to clarify, PHP doesn't offer two separate approaches of handling
errors. We need to first distinguish between w
On Thu, May 2, 2013 at 6:46 PM, Stuart Langley wrote:
> So is the feature you're describing is tuples and a use case of that feature
> is an easier way to do error handling?
No.
Tuples are an implementation detail specific to how Python allows one
to conveniently return multiple values. I merely
So is the feature you're describing is tuples and a use case of that
feature is an easier way to do error handling?
On Fri, May 3, 2013 at 8:00 AM, Adam Jon Richardson wrote:
> PHP currently has two separate approaches to handling errors:
> - Errors
> - Exceptions
>
> Both have their issues.
>
>
PHP currently has two separate approaches to handling errors:
- Errors
- Exceptions
Both have their issues.
Using and responding to errors requires that the returned value (if
there is one) perform double duty as both a potential valid response
AND, in the case of error, a flag that something wen