On 2/25/15 5:45 AM, Peter Holák wrote:
One thing to consider when annotations are classes is whether using an
annotation should make the annotated class depend on the annotation
classes it uses. In other words, would a missing annotation class
produce an error? It doesn't in Java (at runtime,
One thing to consider when annotations are classes is whether using an
annotation should make the annotated class depend on the annotation
classes it uses. In other words, would a missing annotation class
produce an error? It doesn't in Java (at runtime, see
http://stackoverflow.com/a/3567969) and
On 02/21/2015 03:35 PM, Pavel Kouřil wrote:
I know you could wrap it in your code, but that would still mean there
would probably be multiple implementations of Annotations in the
wild, instead of a good complete functionality in the language
itself.
I know PHP is not primarily an OOP
On Wed, Feb 18, 2015 at 9:45 PM, Benjamin Eberlei kont...@beberlei.de wrote:
On Wed, Feb 18, 2015 at 9:29 PM, Pavel Kouřil pajou...@gmail.com wrote:
As a Doctrine user, I find this way worse than current state. This
syntax looks UGLY and contains a lot of useless clutter. And yeah,
adding
Am 19.02.2015 um 08:14 schrieb Dmitry Stogov:
On Thu, Feb 19, 2015 at 2:12 AM, François Laupretre franc...@php.net
mailto:franc...@php.net wrote:
If I understand Dmitry correctly, this would be stored as the
compiler internal representation of the 'new Entity(foo)' code,
but this
On Wed, Feb 18, 2015 at 11:05 AM, Benjamin Eberlei kont...@beberlei.de
wrote:
On Wed, Feb 18, 2015 at 8:02 AM, Dmitry Stogov dmi...@zend.com wrote:
On Wed, Feb 18, 2015 at 12:51 AM, guilhermebla...@gmail.com
guilhermebla...@gmail.com wrote:
François,
Doctrine relies on nested
On Wed, Feb 18, 2015 at 8:02 AM, Dmitry Stogov dmi...@zend.com wrote:
On Wed, Feb 18, 2015 at 12:51 AM, guilhermebla...@gmail.com
guilhermebla...@gmail.com wrote:
François,
Doctrine relies on nested annotations for a variety of mapping
information.
One example:
On Wed, Feb 18, 2015 at 11:59 AM, Derick Rethans der...@php.net wrote:
On Tue, 17 Feb 2015, Dmitry Stogov wrote:
On Mon, Feb 16, 2015 at 10:57 PM, Derick Rethans der...@php.net wrote:
On Mon, 16 Feb 2015, Dmitry Stogov wrote:
hi,
During discussion of different ways of
On Tue, 17 Feb 2015, Dmitry Stogov wrote:
On Mon, Feb 16, 2015 at 10:57 PM, Derick Rethans der...@php.net wrote:
On Mon, 16 Feb 2015, Dmitry Stogov wrote:
hi,
During discussion of different ways of implementing Design by Contract
we
got an idea of using annotations.
On Wed, Feb 18, 2015 at 6:14 PM, François Laupretre franc...@php.net
wrote:
Hi Dmitry,
Right. That’s what I got from your last reply. But my question was about
another post where you are talking about ‘compile time evaluation’ of
expressions, which is different from the bare key/value
Hi Dmitry,
Are you (and Doctrine team) interested in this annotation idea?
I'd say that Benjamin nailed in our possible usage:
orm(new Entity(foo))
class Foo {
}
Now I do feel we need to elaborate some sort of named parameters. Doctrine
tries to simplify a lot developer's life by using
On Wed, Feb 18, 2015 at 7:28 PM, guilhermebla...@gmail.com
guilhermebla...@gmail.com wrote:
Hi Dmitry,
Are you (and Doctrine team) interested in this annotation idea?
I'd say that Benjamin nailed in our possible usage:
orm(new Entity(foo))
class Foo {
}
Now I do feel we need to
Hi Guilherme,
De : guilhermebla...@gmail.com [mailto:guilhermebla...@gmail.com]
orm(
[
new OneToOne(Address),
new JoinColumn(default, default, default, default, CASCADE)
]
)
public $address;
Why not :
orm([
'OneToOne' = Address,
'JoinColumns' = [
On Wed, Feb 18, 2015 at 9:40 PM, François Laupretre franc...@php.net
wrote:
Hi Guilherme,
De : guilhermebla...@gmail.com [mailto:guilhermebla...@gmail.com]
orm(
[
new OneToOne(Address),
new JoinColumn(default, default, default, default, CASCADE)
]
)
On Wed, Feb 18, 2015 at 9:29 PM, Pavel Kouřil pajou...@gmail.com wrote:
On Wed, Feb 18, 2015 at 7:28 PM, guilhermebla...@gmail.com
guilhermebla...@gmail.com wrote:
Hi Dmitry,
Are you (and Doctrine team) interested in this annotation idea?
I'd say that Benjamin nailed in our possible
Hi List,
orm(new Entity(foo))
this may be off-topic. However i'm wondering how this could be an
annotation? It looks like code. Why not include this into proper method?
What am i missing?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:
février 2015 23:11
À : PHP Developers Mailing List
Objet : Re: [PHP-DEV] Annotations in PHP7
Hi List,
orm(new Entity(foo))
this may be off-topic. However i'm wondering how this could be an
annotation? It looks like code. Why not include this into proper method?
What am i missing
De : Benjamin Eberlei [mailto:kont...@beberlei.de]
nested can be done in any way, its a statement so the following would work:
orm(new JoinTable(['joinColumns' = [new JoinColumn('id', 'other_id')]]))
Dmitry is planning compile time evaluation, which is probably the only way to
do it if we
Hi Dmitry,
Right. That’s what I got from your last reply. But my question was about
another post where you are talking about ‘compile time evaluation’ of
expressions, which is different from the bare key/value storage I understood
first, and poses the problem of compile time evaluation
...@googlemail.com]
Envoyé : mercredi 18 février 2015 23:11
À : PHP Developers Mailing List
Objet : Re: [PHP-DEV] Annotations in PHP7
Hi List,
orm(new Entity(foo))
this may be off-topic. However i'm wondering how this could be an
annotation? It looks like code. Why not include
On Wed, Feb 18, 2015 at 12:51 AM, guilhermebla...@gmail.com
guilhermebla...@gmail.com wrote:
François,
Doctrine relies on nested annotations for a variety of mapping information.
One example:
On Tue, Feb 17, 2015 at 10:13 PM, Alexander Lisachenko
lisachenko...@gmail.com wrote:
2015-02-17 19:25 GMT+03:00 Dmitry Stogov dmi...@zend.com:
I think yes,
However, Alexander thinks differently
https://wiki.php.net/rfc/parser-extension-api
Of course this is not for 7.0
This RFC
On Tue, Feb 17, 2015 at 5:06 PM, Nikita Popov nikita@gmail.com wrote:
On Mon, Feb 16, 2015 at 10:15 PM, Dmitry Stogov dmi...@zend.com wrote:
Hi Nikita,
On Tue, Feb 17, 2015 at 12:07 AM, Nikita Popov nikita@gmail.com
wrote:
On Mon, Feb 16, 2015 at 10:02 PM, Dmitry Stogov
On Mon, Feb 16, 2015 at 10:15 PM, Dmitry Stogov dmi...@zend.com wrote:
Hi Nikita,
On Tue, Feb 17, 2015 at 12:07 AM, Nikita Popov nikita@gmail.com
wrote:
On Mon, Feb 16, 2015 at 10:02 PM, Dmitry Stogov dmi...@zend.com wrote:
On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei
2015-02-17 19:25 GMT+03:00 Dmitry Stogov dmi...@zend.com:
I think yes,
However, Alexander thinks differently
https://wiki.php.net/rfc/parser-extension-api
Of course this is not for 7.0
This RFC consists of two parts: parsing API and parser extension API. Last
one can be rejected, however it
Hi Alexander,
De : Alexander Lisachenko [mailto:lisachenko...@gmail.com]
This RFC consists of two parts: parsing API and parser extension API. Last
one can be rejected, however it can be perfectly connected with annotation
RFC (if AST will be used as values)
Parser extension API is great.
François,
Doctrine relies on nested annotations for a variety of mapping information.
One example:
http://doctrine-orm.readthedocs.org/en/latest/reference/association-mapping.html#one-to-many-unidirectional-with-join-table
[]s,
On Tue, Feb 17, 2015 at 4:33 PM, François Laupretre
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by Contract we
got an idea of using annotations.
BTW: annotations are useful by their own and may be used for different
purposes. Support for annotations
On Mon, 16 Feb 2015, Dmitry Stogov wrote:
hi,
During discussion of different ways of implementing Design by Contract we
got an idea of using annotations.
BTW: annotations are useful by their own and may be used for different
purposes. Support for annotations was proposed long time ago:
On Mon, Feb 16, 2015 at 1:33 PM, Benjamin Eberlei kont...@beberlei.de wrote:
On Mon, Feb 16, 2015 at 1:17 PM, Pavel Kouřil pajou...@gmail.com wrote:
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by
Hi Nikita,
On Tue, Feb 17, 2015 at 12:07 AM, Nikita Popov nikita@gmail.com wrote:
On Mon, Feb 16, 2015 at 10:02 PM, Dmitry Stogov dmi...@zend.com wrote:
On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei kont...@beberlei.de
wrote:
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov
On Mon, Feb 16, 2015 at 1:14 PM, Alexander Lisachenko
lisachenko...@gmail.com wrote:
2015-02-16 15:12 GMT+03:00 Benjamin Eberlei kont...@beberlei.de:
but what is the API of an AST node and how does the visitor look like?
I have a draft for that:
We don't have final design yet. just idea(s) and a question - should we try
to do it for PHP7 or later or not at all.
Thanks. Dmitry.
On Mon, Feb 16, 2015 at 3:43 PM, Cesar Rodas ce...@rodas.me wrote:
On 16/02/15 13:40, Alexander Lisachenko wrote:
2015-02-16 15:31 GMT+03:00 Benjamin
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by Contract we
got an idea of using annotations.
BTW: annotations are useful by their own and may be used for different
purposes. Support for annotations was
On Mon, Feb 16, 2015 at 1:17 PM, Pavel Kouřil pajou...@gmail.com wrote:
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by Contract
we
got an idea of using annotations.
BTW: annotations are useful
2015-02-16 15:31 GMT+03:00 Benjamin Eberlei kont...@beberlei.de:
My question is how do i evaluate this at runtime? I suppose a function is
necessary like evaluate_ast(...), but that requires passing the context.
many many open questions and as nikic points out this should probably be
On 16/02/15 14:00, Dmitry Stogov wrote:
We don't have final design yet. just idea(s) and a question - should we try
to do it for PHP7 or later or not at all.
That is awesome. I would vote for a yes and I'd like it out ASAP (I
would adapt my own annotation parser to read *also* this
On 16/02/15 13:40, Alexander Lisachenko wrote:
2015-02-16 15:31 GMT+03:00 Benjamin Eberlei kont...@beberlei.de:
My question is how do i evaluate this at runtime? I suppose a function is
necessary like evaluate_ast(...), but that requires passing the context.
many many open questions and as
our approach is more powerfull, and HHVM syntax is not sufficient.
Also somethig looks better than something.
anyway, syntax decorators are discussable.
Thanks. Dmitry.
On Mon, Feb 16, 2015 at 3:19 PM, Dennis Birkholz den...@birkholz.biz
wrote:
Hi,
Am 16.02.2015 um 12:07 schrieb Dmitry
2015-02-16 15:12 GMT+03:00 Benjamin Eberlei kont...@beberlei.de:
but what is the API of an AST node and how does the visitor look like?
I have a draft for that:
https://gist.github.com/lisachenko/ffcfdec4c46e01864b33 This is extended
version for php-ast extension that I want to propose for
Hi,
Am 16.02.2015 um 12:07 schrieb Dmitry Stogov:
HHVM already implemented similar concept
http://docs.hhvm.com/manual/en/hack.attributes.php
Why not borrow their syntax? Makes it easier to write stuff for both
languages.
Greets,
Dennis
--
PHP Internals - PHP Runtime Development Mailing
On Mon, Feb 16, 2015 at 10:57 PM, Derick Rethans der...@php.net wrote:
On Mon, 16 Feb 2015, Dmitry Stogov wrote:
hi,
During discussion of different ways of implementing Design by Contract
we
got an idea of using annotations.
BTW: annotations are useful by their own and may be used
On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei kont...@beberlei.de
wrote:
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by Contract
we
got an idea of using annotations.
BTW: annotations are
On Mon, Feb 16, 2015 at 10:02 PM, Dmitry Stogov dmi...@zend.com wrote:
On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei kont...@beberlei.de
wrote:
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by
hi,
During discussion of different ways of implementing Design by Contract we
got an idea of using annotations.
BTW: annotations are useful by their own and may be used for different
purposes. Support for annotations was proposed long time ago:
https://wiki.php.net/rfc/annotations
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov dmi...@zend.com wrote:
hi,
During discussion of different ways of implementing Design by Contract we
got an idea of using annotations.
BTW: annotations are useful by their own and may be used for different
purposes. Support for annotations
the idea to not evaluate non-constant expressions at all, but just keep AST
and provide interface to read it.
PHP extensions should be able to use them as they like. (evaluate or insert
into AST of function(s), etc).
Thanks. Dmitry.
On Mon, Feb 16, 2015 at 2:36 PM, Benjamin Eberlei
On Mon, Feb 16, 2015 at 12:42 PM, Dmitry Stogov dmi...@zend.com wrote:
the idea to not evaluate non-constant expressions at all, but just keep
AST and provide interface to read it.
PHP extensions should be able to use them as they like. (evaluate or
insert into AST of function(s), etc).
Ok
yeah, it was a typo, that I fixed in first place, but not in the output
On Mon, Feb 16, 2015 at 2:49 PM, Benjamin Eberlei kont...@beberlei.de
wrote:
On Mon, Feb 16, 2015 at 12:42 PM, Dmitry Stogov dmi...@zend.com wrote:
the idea to not evaluate non-constant expressions at all, but just keep
2015-02-16 14:42 GMT+03:00 Dmitry Stogov dmi...@zend.com:
the idea to not evaluate non-constant expressions at all, but just keep
AST and provide interface to read it.
PHP extensions should be able to use them as they like. (evaluate or
insert into AST of function(s), etc).
Thanks. Dmitry.
On Mon, Feb 16, 2015 at 1:10 PM, Alexander Lisachenko
lisachenko...@gmail.com wrote:
2015-02-16 14:42 GMT+03:00 Dmitry Stogov dmi...@zend.com:
the idea to not evaluate non-constant expressions at all, but just keep
AST and provide interface to read it.
PHP extensions should be able to use
51 matches
Mail list logo