On 08/21/2015 06:36 AM, Anthony Ferrara wrote: > My proposal/stance: > > Let's make random_* throw an Exception if it cannot connect to a > random source. And let's have it throw an TypeError if ZPP fails, or > Error if min >= max. > > The first two are consistent with existing exceptions.
I don't think anyone would argue those two. It makes sense. > The third (Error if min>max) is where the contention lies. I'm > suggesting Error as it's consistent with parameter errors in the sense > that the type may be correct, but the value isn't (hence it's the same > kind of error as a parameter error, just a different > sub-classification. > > MHO is this is too important of a distinction to simply gloss over. > Having it return false (or null) will be a problem, as nobody will > perform the error checks. And returning $x where `$x == 0` in a > security context could be incredibly bad. As such, I think the > security implications here outweigh nearly all of the other concerns > about consistency and convention. > > That's my opinion. I'll be happy to make the changes if a RM gives me > the green light to do so. An error on this makes sense to me too and it doesn't seem like much of an issue to make this change now. But yes, it is the RM's final call. -Rasmus
signature.asc
Description: OpenPGP digital signature