On 5/6/2016 8:02 AM, Dmitry Stogov wrote:
> On 05/06/2016 05:06 AM, Jesse Schalken wrote:
>> If you're going to say "do what you want" with regards to annotations,
>> then
>> just let them be a text string. Parsing the annotation as PHP but not
>> evaluating it as PHP seems a very strange and
On 05/06/2016 05:06 AM, Jesse Schalken wrote:
If you're going to say "do what you want" with regards to annotations, then
just let them be a text string. Parsing the annotation as PHP but not
evaluating it as PHP seems a very strange and arbitrary half-way point. If
the thing consuming the AST
If you're going to say "do what you want" with regards to annotations, then
just let them be a text string. Parsing the annotation as PHP but not
evaluating it as PHP seems a very strange and arbitrary half-way point. If
the thing consuming the AST is expected to eval() it, then why didn't PHP
do
On 5 May 2016 at 15:24, Larry Garfield wrote:
> because it doesn't define "right way".
Good.
> I could easily see, for instance, Doctrine annotations building the
> first, PHPUnit the second, and Zend the 3rd.
Good!
It's not the job of PHP core to tell people how to
Larry Garfield wrote on 05/05/2016 15:24:
<> Translator)>>
<>
<>
I could easily see, for instance, Doctrine annotations building the
first, PHPUnit the second, and Zend the 3rd. Those would all be
legal-ish, but
On 05/05/2016 02:07 AM, Dmitry Stogov wrote:
Maybe that's what we want to have here - freedom for everybody to invent
their own languages - but I fear the danger of fragmentation here and
also people implementing tons of slightly different incompatible parsers
for ASTs that are generated.
Stanislav Malyshev wrote on 05/05/2016 07:48:
The key idea of RFC was not to invite another language for meta-data,
>but use PHP language itself.
This is a good way to avoid handling a lot of issue, but what I am
afraid of is that with this solution, what would happen that people
start doing
On 05/05/16 08:34, Dmitry Stogov wrote:
>> I think this way can give a good start point with possibility to
>> standardize handling of attributes in the future. From the PHP engine
>> side, all attributes are AST nodes that can be processed later on the
>> userland side.
>>
> Something like this
On 05/05/2016 10:24 AM, Alexander Lisachenko wrote:
Hello, internals!
2016-05-05 9:48 GMT+03:00 Stanislav Malyshev >:
Maybe that's what we want to have here - freedom for everybody to
invent
their own languages - but I fear the
Hello, internals!
2016-05-05 9:48 GMT+03:00 Stanislav Malyshev :
> Maybe that's what we want to have here - freedom for everybody to invent
> their own languages - but I fear the danger of fragmentation here and
> also people implementing tons of slightly different
On 05/05/2016 09:48 AM, Stanislav Malyshev wrote:
Hi!
It's also possible to write:
<>
you don't need to split your annotation into many attributes. You should
just adopt its
Hi!
> It's also possible to write:
>
> < "id" = "system_branding_block",
> "admin_label" = @Translation("Site branding")
> ]))>>
>
>
> you don't need to split your annotation into many attributes. You should
> just adopt its syntax to become a valid PHP
On 05/01/2016 10:47 PM, Larry Garfield wrote:
On 04/30/2016 06:21 PM, Rowan Collins wrote:
On 30/04/2016 23:45, Stanislav Malyshev wrote:
Oh, of course you can have methods, but then it is strange conceptually
- you have a normal class, which some other part of the language just
uses for
On 04/30/2016 02:47 AM, Larry Garfield wrote:
Most of the examples that have been given so far are either trivial
boolean flags or data validation rules to be evaled. In practice,
very little of Drupal's use of annotations in Drupal 8 fit either
category. Rather, they're used primarily as,
On 4 May 2016 10:41 pm, "Rowan Collins" wrote:
>
>
> You could either think of this as "setting lots of variables":
>
> new Foo { $bar = 1, $baz = 2 }
>
> or you could think of it as "an object literal like an array literal":
>
> new Foo { 'bar' => 1, 'baz' => 2 }
>
I
Jesse Schalken wrote on 04/05/2016 13:20:
(maybe there should be a $ before the property names, not sure)
And there's the rub! :P
When named parameters have been discussed before, there was a lot of
bikeshedding over what the syntax should look like, and this is arguably
a very similar
On Sat, Apr 30, 2016 at 9:47 AM, Larry Garfield
wrote:
> 3) Some way to provide a data definition for the annotation that can be
> checked at compile time. This could be classes, a la Doctrine. It could be
> a new Annotation type as others have suggested. It could be
Hey Stas,
On 1 May 2016 at 00:14, Stanislav Malyshev wrote:
> > $def instanceof MyAnnotation; //TRUE
>
> That looks fine, however the problem is that if MyAnnotation is a class,
> then PHP does not have multiple inheritance, so it's the only class it
> can be. And given
Hi!
> It would never occur to me to not have it regenerated on each access.
If I want to cache it I will do so myself, thanks.
Not sure why would you care. These should be value objects, so they
should keep no state and as such it shouldn't matter when they are
generated and how many of them.
>
On 04/30/2016 06:21 PM, Rowan Collins wrote:
On 30/04/2016 23:45, Stanislav Malyshev wrote:
Oh, of course you can have methods, but then it is strange conceptually
- you have a normal class, which some other part of the language just
uses for something else that classes are not routinely used
On 30/04/2016 23:45, Stanislav Malyshev wrote:
Oh, of course you can have methods, but then it is strange conceptually
- you have a normal class, which some other part of the language just
uses for something else that classes are not routinely used for. I.e.,
does it call a constructor? When?
Hi!
> What would prevent the class from having methods?
>
> class MyAnnotation
> {
> public $foo;
> public $bar;
> public function doStuff() { ... }
> }
Oh, of course you can have methods, but then it is strange conceptually
- you have a normal class, which some other part of the language just
On 30/04/2016 23:14, Stanislav Malyshev wrote:
$def instanceof MyAnnotation; //TRUE
That looks fine, however the problem is that if MyAnnotation is a class,
then PHP does not have multiple inheritance, so it's the only class it
can be. And given that your class has no methods, $def has no
Hi!
> <>
Here you have essentially created a named parameter syntax. That may be
a problem later, especially if we do implement named parameters and this
won't be the syntax we choose.
> $def instanceof MyAnnotation; //TRUE
That looks fine, however the
On 04/30/2016 04:12 PM, Stanislav Malyshev wrote:
Hi!
That you for bringing real usage examples. This is an interesting point
to consider.
Reading through it, however, I can't help but wonder why these things
are not just data? I mean, why they are kept in the comments? If there
are reasons
Hi!
That you for bringing real usage examples. This is an interesting point
to consider.
Reading through it, however, I can't help but wonder why these things
are not just data? I mean, why they are kept in the comments? If there
are reasons like performance, there could be solutions developed,
On 04/29/2016 11:54 PM, Pierre Joye wrote:
Hi Larry,
On Apr 30, 2016 6:48 AM, "Larry Garfield" wrote:
Most of the examples that have been given so far are either trivial
boolean flags or data validation rules to be evaled. In practice, very
little of Drupal's use of
Hi Larry,
On Apr 30, 2016 6:48 AM, "Larry Garfield" wrote:
>
> Most of the examples that have been given so far are either trivial
boolean flags or data validation rules to be evaled. In practice, very
little of Drupal's use of annotations in Drupal 8 fit either
28 matches
Mail list logo