Good reminder, thanks! Implementation would indeed require support
from PHP, say:
// magic-method __decorate implies that __construct would return
$this->__decorate(func_get_args(), $f); and enforce @ as
annotation-syntax
class Dec1 {
function __decorate($args, $f) {
return $f;
}
}
Am 16.09.2010 18:02, schrieb Matthew Weier O'Phinney:
>
>> in my mind there is a big mistake when using annotations in PHPDoc comments.
> What is the mistake? You don't explain that anywhere in your reply -- you
> simply
> give code examples of how you feel they should work.
>
For me the mistake
On 2010-09-15, Christian Kaps wrote:
> Am 14.09.2010 22:12, schrieb Stas Malyshev:
> > I think we _already_ have metadata in PHP, albeit done through
> > phpdocs. So the question is kind of moot :) We should see if it's
> > enough for us or we want to add/change/extend it and if so, how.
>
> in m
Hi!
Could PHP as a language be kept "pure" by first implementing python
decorators*, then implement annotations using a purpose-built
decorator?
No, we can't have python decorators because unlike Python PHP functions
and classes aren't first-class objects. In Python, this:
@dec2
@dec1
def f
On Wed, Sep 15, 2010 at 5:27 PM, Arvids Godjuks
wrote:
> Hi all.
>
> As a user land developer and active reader (and some times poster) for
> a few years now this is the first time I trully don't understand what
> the hell are you talking about and what are annotations at all and
> what will be th
Tangent:
Could PHP as a language be kept "pure" by first implementing python
decorators*, then implement annotations using a purpose-built
decorator?
@annotate(PHP-code-goes-here)
function framework_call(request) { ... }
* http://www.python.org/dev/peps/pep-0318/
--
PHP Internals - PHP Runtime
On 16 September 2010 16:40, Aleksei Sapunov wrote:
> Hi,
> Yes, you right. But [] are used in arrays definition. If take in to account
> that format with @ is more readable?
>
> Is it a problem to implement it using @ symbol?
If we're down to bickering about the finer points of the syntax, can
we
Hi,
Yes, you right. But [] are used in arrays definition. If take in to account
that format with @ is more readable?
Is it a problem to implement it using @ symbol?
2010/9/16 Christian Kaps
> Hi,
>
> it's reserved for the error control
> operator(http://www.php.net/manual/en/language.operators.
Hi,
it's reserved for the error control
operator(http://www.php.net/manual/en/language.operators.errorcontrol.php).
Greetings,
Christian
On Thu, 16 Sep 2010 11:26:51 +0300, Aleksei Sapunov
wrote:
> Hello all,
> Only today see that here is very intersting discussion.
> I have a question: why was
Hello all,
Only today see that here is very intersting discussion.
I have a question: why was choosed exactly this format (seems like c#-like,
not java-like)?
Simply [] is used for arrays. Why not use @ at annotation name?
2010/9/16 Pierre Joye
> On Wed, Sep 15, 2010 at 10:27 PM, Arvids Godjuks
On Wed, Sep 15, 2010 at 10:27 PM, Arvids Godjuks
wrote:
> P.S. Personally I would take the energy boiling in this thread and
> throw it at solving the windows biuld and PECL problem. Right now you
> can't install PHP 5.2 and apache on a Windows 7 - it just crashes
> totally.
Where are the bugs r
On Wed, Sep 15, 2010 at 10:27 PM, Arvids Godjuks
wrote:
> Hi all.
>
> As a user land developer and active reader (and some times poster) for
> a few years now this is the first time I trully don't understand what
> the hell are you talking about and what are annotations at all and
> what will be t
Gustavo's message pretty much expresses exactly how I feel.
As an extension, I feel that as long as annotations don't slow down
existing non-annotated code (or code using the ridiculous phpdoc
parsing), then I see no reason to keep annotations from being added.
People argue that the new synta
On Wed, 15 Sep 2010 23:00:15 +0100, Stas Malyshev
wrote:
easy as possible for the sooner. In the case of the annotation, the
kids writing their websites won't use them, the learning curve remains
unchanged.
No, because they look at the framework code and when they see all this
{...@#!blah
Hi!
easy as possible for the sooner. In the case of the annotation, the
kids writing their websites won't use them, the learning curve remains
unchanged.
No, because they look at the framework code and when they see all this
{...@#!blah($...@blah=blah$^)]} they'd have hard time figuring out w
hi Stas,
On Wed, Sep 15, 2010 at 8:27 PM, Stas Malyshev wrote:
> PHP is meant for different audience than C# or Java. PHP is an entry-level
> language. If you have same learning curve for PHP as they have for Java,
> what we are doing here? Just adding $'s to variables? There should be a
> diffe
Hi all.
As a user land developer and active reader (and some times poster) for
a few years now this is the first time I trully don't understand what
the hell are you talking about and what are annotations at all and
what will be the usage of them in the PHP. And for what? Building 2-3
frameworks a
On Wed Sep 15 12:17 PM, Guilherme Blanco wrote:
> I think meta programming is not and would never be part of comment.
> As previously said, docblock means documentation, without any meaning
> to parser, entirely human readable and totally removable without
> affecting overall execution.
I have t
On Wed, 15 Sep 2010 07:55:55 +0100, Zeev Suraski wrote:
At 08:09 15/09/2010, Stas Malyshev wrote:
Phpdocs aren't "user documentation" only, not for a long time (I mean
the concept, not the particular application called phpDocumentor, of
course). They are being used as metadata in many place
Hi!
However I agree about the syntax issues, but the problem is the total
lack of clean roadmap and designs more than features additions like
this one. The way we decided the NS separator was typically one of
these bad choices, made in a hurry without consensus.
I wouldn't call it "in a hurry"
---Original Message-----
> From: Guilherme Blanco [mailto:guilhermebla...@gmail.com]
> Sent: 15 September 2010 17:18
> To: Lars Schultz
> Cc: internals@lists.php.net
> Subject: Re: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch
>
> It's curious that you keep complaining about n
.com]
Sent: 15 September 2010 17:18
To: Lars Schultz
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch
It's curious that you keep complaining about new syntax and propose a
new one at the same time.
[Foo] introduces new concept, use /** @Foo */ or /** [Foo
It's curious that you keep complaining about new syntax and propose a
new one at the same time.
[Foo] introduces new concept, use /** @Foo */ or /** [Foo] */ instead.
What's the point then?
I think meta programming is not and would never be part of comment.
As previously said, docblock means doc
listen to this man;) I think he's on to something. I don't see any
problem with that aproach and both parties would be satisfied, no?
Am 15.09.2010 10:45, schrieb Benjamin Eberlei:
Hi Zeev and Stas,
I wouldnt mind extending doc block metadata support instead of adding a
new syntax.
I ag
On Wed, 15 Sep 2010 10:46:45 +0200, Pierre Joye
wrote:
> The only difference in PHP is the complete lack of clear road map and
> the chaotic way of deciding things.
Yes, I personally see here a huge problem too.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: ht
On Wed, 15 Sep 2010 10:12:43 +0200, Zeev Suraski wrote:
> At 09:37 15/09/2010, Christian Kaps wrote:
>>On Tue, 14 Sep 2010 23:09:02 -0700, Stas Malyshev
>> wrote:
>>
>> > Whatever syntax it is, it is definitely new.
>>
>>Yes, but this should not be an argument against it. So every new
>>feature ca
On Wed, Sep 15, 2010 at 10:12 AM, Zeev Suraski wrote:
> In terms of language-level features, I don't think it's bad at all if PHP
> went into a mode that most of the other mature languages went into - where
> syntax changes or introduction of new language level features are pretty
> rare. Out of
Hi Zeev and Stas,
I wouldnt mind extending doc block metadata support instead of adding a
new syntax.
I agree with you that PHP Docs allow metadata and they can be used for
that (and some people do, including me), however what the annotation patch
+ rfc tries to achieve is something going
At 09:37 15/09/2010, Christian Kaps wrote:
On Tue, 14 Sep 2010 23:09:02 -0700, Stas Malyshev
wrote:
> Whatever syntax it is, it is definitely new.
Yes, but this should not be an argument against it. So every new
feature can have new syntax or should PHP freeze on the current state!?
I can't ho
Hi!
- Annotations are like enum fields, or a function headers. You can only
specify these values defined by the annotation. In normal data
structures like arrays you can define what you will.
This is irrelevant for PHP as it's not compiled. So the check would
happen in runtime, how does it ma
On Tue, 14 Sep 2010 23:09:02 -0700, Stas Malyshev
wrote:
> Whatever syntax it is, it is definitely new.
Yes, but this should not be an argument against it. So every new
feature can have new syntax or should PHP freeze on the current state!?
I can't honestly understand why developer shouldn't un
On Tue, 14 Sep 2010 23:09:02 -0700, Stas Malyshev
wrote:
> Hi!
>
>> class User {
>>
>> [NotNull]
>> [Integer]
>> public $id;
>>
>> [NotNull]
>> [Regexp('/[a-z]*/i')]
>> [MinLength(2)]
>> [MaxLength(255)]
>> public $name;
>>
>> [NotNull]
>> [Zipcod
At 08:09 15/09/2010, Stas Malyshev wrote:
Phpdocs aren't "user documentation" only, not for a long time (I
mean the concept, not the particular application called
phpDocumentor, of course). They are being used as metadata in many
places. You could argue that's misguided but you can't ignore the
Hi!
I think we have the main issue here, it has absolutely nothing to do
with users documentation, as phpdoc does. Yes, they both somehow
> 'document' something but still totally unrelated for the goals and
> usages. To understand that would help to move forward.
Phpdocs aren't "user documenta
Hi!
class User {
[NotNull]
[Integer]
public $id;
[NotNull]
[Regexp('/[a-z]*/i')]
[MinLength(2)]
[MaxLength(255)]
public $name;
[NotNull]
[Zipcode]
public $zipcode;
}
I'm not sure I understand - why can't you use normal data structure to
Am 14.09.2010 22:12, schrieb Stas Malyshev:
> I think we _already_ have metadata in PHP, albeit done through
> phpdocs. So the question is kind of moot :) We should see if it's
> enough for us or we want to add/change/extend it and if so, how.
>
Hi,
in my mind there is a big mistake when using a
hi,
On Tue, Sep 14, 2010 at 10:12 PM, Stas Malyshev wrote:
> I think we _already_ have metadata in PHP, albeit done through phpdocs. So
> the question is kind of moot :) We should see if it's enough for us or we
> want to add/change/extend it and if so, how.
I think we have the main issue here,
Hi!
Last year, I attended to a conference where you (Stas) told that the
best way to do a feature request/proposal was by writing a RFC and a
patch even if the patch is not perfect. The current implementation may
not be perfect but it was never said it was a final one. This is a
proposal of a fi
Hi,
Last year, I attended to a conference where you (Stas) told that the best
way to do a feature request/proposal was by writing a RFC and a patch even
if the patch is not perfect. The current implementation may not be perfect
but it was never said it was a final one. This is a proposal of a firs
hi Stas,
On Tue, Sep 14, 2010 at 9:01 PM, Stas Malyshev wrote:
> Of course not. It couldn't be that your opponents know what they are talking
> about, otherwise they'd agree with you :) Come on. Usefullness of
> annotations in Java (where they are very different, as the language is) or
> C# (whi
Hi!
There are plenty of use cases for that. The main problem I see is that
nobody seems to have actually used them in other languages, and then
Of course not. It couldn't be that your opponents know what they are
talking about, otherwise they'd agree with you :) Come on. Usefullness
of annot
On Tue, Sep 14, 2010 at 7:25 PM, Nate Abele wrote:
> > > At 17:51 13/09/2010, Gustavo Lopes wrote:
> > >> On Mon, 13 Sep 2010 16:28:47 +0100, Zeev Suraski
> wrote:
> > >>
> > >>> At 16:39 13/09/2010, Pierre Joye wrote:
> > You are not serioulsy suggesting to use phpdoc for runtime
> annotat
hi,
On Tue, Sep 14, 2010 at 8:30 PM, Jonathan Bond-Caron wrote:
> On Tue Sep 14 01:25 PM, Nate Abele wrote:
>>
>> Sorry, but I don't see how this is even remotely close to being
>> appropriate for PHP. Maybe I'm missing something. :-)
>>
>
> I agree, the use cases are just not there
There are pl
On Tue Sep 14 01:25 PM, Nate Abele wrote:
>
> Sorry, but I don't see how this is even remotely close to being
> appropriate for PHP. Maybe I'm missing something. :-)
>
I agree, the use cases are just not there
Though maybe some form of "annotations" could be useful in php as a
"pluggable type"
> > At 17:51 13/09/2010, Gustavo Lopes wrote:
> >> On Mon, 13 Sep 2010 16:28:47 +0100, Zeev Suraski wrote:
> >>
> >>> At 16:39 13/09/2010, Pierre Joye wrote:
> You are not serioulsy suggesting to use phpdoc for runtime annotation
> support? Are you?
> >>>
> >>> I actually am (either that
45 matches
Mail list logo