Re: [RFC] Scalar Type Hints v0.2
| From: | Marc Bennewitz | Date: | Thu, 15 Jan 2015 20:39:27 +0000 |
| Subject: | Re: [RFC] Scalar Type Hints v0.2 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80589@lists.php.net to get a copy of this message | ||
Am 15.01.2015 um 20:45 schrieb Marcio Almada:
Hi, I would like to call everyone's attention, specially people contributing directly to this RFC series, to what S.A.N just said:A function only defines the arguments and types it requires and not where the arguments comes from. Casting is part of "Where the arguments comes from" MarcMany developers PHP offers dual syntax: 1. Strict function bar(int $num){} 2. Lax function bar((int) $num){} Maybe it makes sense to put this option on the ballot if it passes a vote, it will be possible to put an end to the discus?This idea has been **so recurrent** and yet systematically ignored by RFC owners. Why? I think that we need to baby step and try to approve coercive type declarations first and decide upon a possible stricter type check later: How a bout a reboot of what ircmaxell@php.net already started in https://wiki.php.net/rfc/parameter_type_casting_hints for v0.3? PS: Please, let's not fall into the mindset of "if v0.2 is not a good idea then v0.1 instantly becomes more acceptable", we still have time to try some alternatives.