Re: [PHP-DEV] Re: Voting Process (was: [PHP-DEV] Re: Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward))

2011-06-06 Thread Chad Fulton
. If you haven't already, I recommend you read the (incredibly long) discussions from last summer on type-hinting. They convinced me that sometimes a feature that sounds good is simply not a good fit for PHP for reasons which many did not (still do not?) understand. Chad Fulton -- PHP Internals

Re: [PHP-DEV] annotations again

2011-05-10 Thread Chad Fulton
On Mon, May 9, 2011 at 10:46 PM, Lester Caine les...@lsces.co.uk wrote: *IS* it clear by now that the majority of users want this? For what it's worth, I still oppose Annotations. And the argument that 'You don't have to use it' does not wash either since once it has been pushed in, some of

Re: [PHP-DEV] annotations again

2011-05-10 Thread Chad Fulton
On Tue, May 10, 2011 at 12:35 PM, guilhermebla...@gmail.com guilhermebla...@gmail.com wrote: Hi all, Based on an extensive chat with Matthew, I think we reached some consensus. I'll write another RFC related to Annotations in docblocks, then we can chat until reach some standardization and

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-30 Thread Chad Fulton
Hello! While I personally like PHP's substr() an awful lot and doubt I would use the str_slice() method, I thought I'd mention that I think what you're proposing is much like the string.substring(from, to) method in Javascript (and PHP's current substr() function is an awful lot like Javascript's

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Chad Fulton
Hello, On Wed, Mar 9, 2011 at 10:02 AM, Jarrod Nettles jnett...@inccrra.org wrote: Interesting question. My gut tells me not (as does three years of C# experience). I’m sure that everyone will have a different opinion on this but to me it seems taboo that a child class override the

Re: [PHP-DEV] RFC: about class names as values

2011-01-13 Thread Chad Fulton
Take this with a grain of salt, but: On Thu, Jan 13, 2011 at 7:22 AM, Martin Scotta martinsco...@gmail.com wrote: Hi all, I don't know how the internal development process of PHP works. First at all: was this feature approved? From my experience, don't consider something approved until it's

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Chad Fulton
On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe quickshif...@gmail.com wrote: On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl m4r...@gmail.com wrote: First i have to say that I am not a PHP internals developer, but as a user I think it would maybe be better to just let the trait use the

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Chad Fulton
On Fri, Dec 10, 2010 at 10:39 AM, Nathan Nobbe quickshif...@gmail.com wrote: On Fri, Dec 10, 2010 at 11:04 AM, Chad Fulton chadful...@gmail.com wrote: On Fri, Dec 10, 2010 at 9:29 AM, Nathan Nobbe quickshif...@gmail.com wrote: On Fri, Dec 10, 2010 at 10:15 AM, Martin Wernstahl m4r

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Chad Fulton
On Fri, Dec 10, 2010 at 1:00 PM, Nathan Nobbe quickshif...@gmail.com wrote: As a note, I'm not strongly opposed to this proposal, since I don't think it would do any harm. It just seems to me like a kitchen sink feature. The issue for me is that traits, as I understand them, are there

Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-12-02 Thread Chad Fulton
Having thought a bit about this, there are a couple of initial problems I see, and, more importantly, I'm not convinced that the stated problem (encapsulation) requires the addition of a new language construct (i.e. a property as distinct from a class member). In fact, I think it is better

Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-11-29 Thread Chad Fulton
On Sun, Nov 28, 2010 at 11:48 PM, Christian Kaps christian.k...@mohiva.com wrote: ... /**  *  */ public function set name(string $name) {    $this-name = htmlentities($name);    $this-name = strip_tags($this-name); } /**  *  */ public function get name($name) {    return $this-name;

Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) support discussion

2010-11-16 Thread Chad Fulton
On Tue, Nov 16, 2010 at 6:03 AM, Lars Schultz lars.schu...@toolpark.com wrote: Hi, I certainly don't have PHP-Karma (Does meritocracy really refer to that?), but simply I can't believe that you're talking about this, again. I think Annotation-Supporters have made their point, but shouldn't

Re: [PHP-DEV] Re: PHP Annotations RFC + Patch

2010-09-16 Thread Chad Fulton
For me, the syntax, or at least the complexity, is important. I like the idea of metadata, but what I found attractive about the docBlock parsing was that it only allowed key/value pairs of meta-data. -1 for annotations in which the engine instantiates arbitrary annotation objects. On Thu, Sep

[PHP-DEV] docBlock Parser RFC

2010-09-16 Thread Chad Fulton
Hello, Based on comments from the annotations thread, I have created a docBlock parser RFC at http://wiki.php.net/rfc/docblockparser This RFC does not deal with annotations per se, but only with the idea of adding a function to the Reflection extension which would parse docBlocks according to a

Re: [PHP-DEV] docBlock Parser RFC

2010-09-16 Thread Chad Fulton
way, I think this would be a nice thing to have. Thanks, Chad On Thu, Sep 16, 2010 at 3:34 PM, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: On Thu, 16 Sep 2010 21:56:04 +0100, Chad Fulton chadful...@gmail.com wrote: Based on comments from the annotations thread, I have created a docBlock

Re: [PHP-DEV] docBlock Parser RFC

2010-09-16 Thread Chad Fulton
Hello! That is a good point, there would be no file-level doc block in the RFC. Here is my reasoning for not including it in the RFC: Since the motivation for this came from the desire for metadata for PHP structures, it seemed inappropriate to include metadata at the file level (since it's not a

Re: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch

2010-09-15 Thread Chad Fulton
Since the parsed version of the docblock would only be accessible through a reflection method, you would have to specifically request it for it to be parsed and given to you as an object or array. Also, it would only be parsed, not executed; I don't think that this is proposing executing comment

Re: [PHP-DEV] Strict typing

2010-08-11 Thread Chad Fulton
anyway .. for the love of god, could be please stop arguing in circles, nothing .. really nothing that people brought forth pro/con any approach in regards to type checking/hinting whatever hasn't been mentioned on this list multiple times. +1 please please please please .. read the

Re: [PHP-DEV] Type hinting

2010-06-01 Thread Chad Fulton
Hello! As I mentioned, I think that we have to inform the caller about the problem (be either a type or a conversion mismatch), so the only options to trigger an error, or throw an exception. I like the exception idea better, because it can be easily handled localy (no need to register a

Re: [PHP-DEV] Type hinting

2010-06-01 Thread Chad Fulton
Hi! Pretty much everywhere. Suppose you have form with, say, 2 fields and first field does not validate. Maybe you want to check the second field too and give the user both errors if they are both wrong? In general, looking at strict typing as user input validation mechanism is a very bad

Re: [PHP-DEV] backslash, really ... ?

2010-04-28 Thread Chad Fulton
You can take a look at the RFP if you like. It discusses the pros and cons of various possible separators, and why they chose the backslash. http://wiki.php.net/rfc/namespaceseparator http://wiki.php.net/rfc/namespaceseparatorI've been using namespaces for a few months now with the backslash