Re: Traits and Conflicts: Collisions as Warnings or Fatal?
| From: | Stefan Marr | Date: | Tue, 07 Dec 2010 11:58:43 +0000 |
| Subject: | Re: Traits and Conflicts: Collisions as Warnings or Fatal? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50891@lists.php.net to get a copy of this message | ||
Hi:
On 05 Dec 2010, at 15:53, Benjamin Eberlei wrote:
> I wondered before why this only triggers a warning. A fatal error sounds good at that point in
> my opinion.
>
> It is comparable to interfaces/Abstract classes being implemented wrong and this also leads to
> a fatal error. Additionally there is no way this "just" happens to your code. You have to
> make changes to a trait explicitly to trigger this problem, so this is only happening in
> development.
So, that is the way to go?
The original idea to go with a warning was, that it is not the case that the engine is in an
unrecoverable state, thus, the code actually will work in that case, but perhaps produce unexpected
results.
In general, PHP uses fatals far to often for my taste, but well, to keep it consistent, we can go
fatal here, too.
Is there a general consensus on that?
Thanks
Stefan
--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: +32 2 629 3525