Re: [PHP-DEV] Strict typing

2010-08-12 Thread Daniel Egeberg
uot; (smartcast) and "function foo(+int $i)" (strict, other char than "plus" could possibly be used). This has two benefits to the former syntax choices: 1) The smartcast syntax would be consistent with how the APIs are documented in PHP's documentation, so the syntax in P

Re: [PHP-DEV] Strict typing

2010-08-11 Thread Daniel Egeberg
PS: Can I get a list of the PHP axioms? Seeing as that's apparently how things are decided, it would be nice if people won't have to waste your precious time making obnoxious feature requests that are *clearly* against the PHP axioms. -- Daniel Egeberg -- PHP Internals - PHP Runtim

Re: [PHP-DEV] Namespace separator constant

2010-08-10 Thread Daniel Egeberg
A default PHP > constant would be a better way to handle such cases. It is already constant (i.e. it's always a backslash). What do you need a constant for? It's not system nor configuration dependent. -- Daniel Egeberg -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] [RFC] Return type-hint

2010-07-29 Thread Daniel Egeberg
sname. > > Try to search "class Object{" or "class Object extends" on google codesearch. > > Maybe this was resolved with the last scalar type hinting patch, which > got merged to the trunk, I don't know. > > ps: the spam filter rejected my previous em

Re: [PHP-DEV] Remove variable function and method calls

2010-07-23 Thread Daniel Egeberg
the public to set expectations. If the documentation is missing information about BC breaks, please file a doc bug at http://bugs.php.net. If nobody is aware that it is lacking, naturally it won't be improved. -- Daniel Egeberg -- PHP Internals - PHP Runtime Development Mailing List To u

Re: [PHP-DEV] Type hinting

2010-05-27 Thread Daniel Egeberg
x27;d gain nothing - as >> a matter of fact you'd lose out a bit since "abc" strings or arrays will >> happily cast into (int), while with our proposed solution - they won't. > > Is a 'scalar' typehint still being considered? It doesn't seem to

Re: [PHP-DEV] Type hinting

2010-05-27 Thread Daniel Egeberg
use explicit types. > For examlpe, we may add a switch in php.ini, let's say, explict_types=On/Off. A php.ini setting is a really bad idea. Say that Library A expects it to be On, but Library B expects it to be Off. Now what happens if I want to use *both* Library A and Library B? -- Danie

Re: [PHP-DEV] Type hinting

2010-05-27 Thread Daniel Egeberg
a: Say you ask the user how old he is (that would be an int)? If he answers "123abc" then your validation logic should catch that he entered an invalid value. Once you've determined that it is a valid value, then casting to int is a non-issue. -- Daniel Egeberg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Type hinting

2010-05-27 Thread Daniel Egeberg
hints at all. If you don't know whether the user/database provided information you have is correct before you pass it along to something else, I would say that the code indeed is bad. Unless you regard "123abc" as a valid value from your user, don't allow the user to give you that

Re: [PHP-DEV] Autoboxing in PHP

2010-05-04 Thread Daniel Egeberg
ed to SplInt, SplBool, etc.? These classes could maybe even be extended with method aliases to the relevant functions in PHP's library. -- Daniel Egeberg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] ArrayAccess::offsetGet not returning a ref

2010-04-27 Thread Daniel Egeberg
end-user perspective, option (d) makes most sense. >> >> Personally, I believe that a fatal on such prototypes error is not >> warranted, so I'd prefer (d). >> >> What do you think would be the best option? Can you think of another? -- Daniel Egeberg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] SVN Account Request: gerardobenitez

2010-04-13 Thread Daniel Egeberg
On Tue, Apr 13, 2010 at 16:21, Gerardo Benitez wrote: > Translating the documentation What language do you intent to translate it to? -- Daniel Egeberg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php