Re: A better error handling approach.
| From: | Adam Jon Richardson | Date: | Fri, 03 May 2013 03:11:44 +0000 |
| Subject: | Re: A better error handling approach. | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67282@lists.php.net to get a copy of this message | ||
On Thu, May 2, 2013 at 6:46 PM, Stuart Langley <slangley@google.com> 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 mentioned this
because PHP's ordered hash maps (arrays) provide a similar avenue of
implementation.
The ability to conveniently pass back multiple values is necessary to
implement and promote an error handling convention similar to Go's, a
convention that seems to work really well for many cases. I was
proposing that this approach be considered as an addition to PHP.
Adam