On Thu, Oct 25, 2012 at 8:36 AM, Kris Craig wrote:
>
> What if, instead of changing the behavior, we have it throw a notice or
> warning if a boolean value is passed here? Because this is such a common
> error, I think it could be really beneficial in helping developers catch
> this early. Thoug
intainer.
I do think education is the key to many things in our world. Please do not
rely purely on the blogosphere to spread the word.
Best regards,
--
Guillaume Rossolini
, it has been stated before on this list that PHP
is its own language.
Regards,
--
Guillaume Rossolini
not PHP's fault. When found, memory leaks in PHP are bugs and bugs
get fixed, so in the long run there are no more memory leaks in PHP than in
other systems. Again, internals is not suited for this talk unless you have
a very specific patch or RFC to discuss.
Regards,
--
Guillaume Rossolini
rustrated.
One use case I can think of is during testing, but in this case you can
already do the same with a testing framework. Just declare the types in the
comments and have the framework use those, but don't let them stand in the
way the app actually works. Using strict type checks would be like hard
coding your debugging breakpoints, would it not?
Best regards,
--
Guillaume Rossolini
other question regarding why the magic method visibility works
as it does, the answer has been given in the following bug reports:
http://bugs.php.net/bug.php?id=40056
http://bugs.php.net/bug.php?id=44769
Regards,
--
Guillaume Rossolini
On Thu, May 27, 2010 at 5:47 PM, Lukas Kahwe Smith wrote:
>
> well most people do not use that since its just as tedious to use as having
> to cast your results. of course if we did have strict typing it would
> probably become more widely used, not that having to add those lines of code
> are som
ing all of my code
to reflect the changes. Not only would it be very frustrating, but also very
confusing for newcomers who have been told for a decade that PHP is simple
to learn. I think API developers would easily cope, but API consumers would
likely be driven away.
Best regards,
--
Guillaume Rossolini
Upgrade wiki.php.net (as per lsmith's and pierre's request)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
stings should take place. Or where they do
take place. Or neither.
foo($bar); // throws an error only if error_level is set to E_HINT
Bottom line: As a user of libraries, I see no good in strong hint typing.
However, as a library developer I see uses for it.
Best regards,
--
Guillaume Rossolini
Hi,
>From a user perspective, I agree that this would probably be the most useful
behaviour of all. "Type hint" would then mean*:
Hint at what type the variable should have. If possible, convert it to the
target type; if it is not even compatible, throw an error*.
Regards,
Guilla
11 matches
Mail list logo