Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Dennis Birkholz
Am 16.02.2015 um 21:39 schrieb François Laupretre: > If we deprecate using bare class names as type hints and replace it with the > 'object(classname)' syntax, we can reserve keywords for 7.0 and, maybe 7.1 > but potential name clashes should be away in 7.2. This is a huge BC break and will alw

Re: [PHP-DEV] Switch jumptable optimization

2015-02-16 Thread Joe Watkins
Very clever ... thanks bob :) Cheers Joe On Tue, Feb 17, 2015 at 6:46 AM, Dmitry Stogov wrote: > On Tue, Feb 17, 2015 at 2:04 AM, Bob Weinand wrote: > > > I'd like to show you my recent work on a jumptable optimization for > > switches. > > > > https://github.com/php/php-src/pull/1048 < > > ht

Re: [PHP-DEV] Switch jumptable optimization

2015-02-16 Thread Dmitry Stogov
On Tue, Feb 17, 2015 at 2:04 AM, Bob Weinand wrote: > I'd like to show you my recent work on a jumptable optimization for > switches. > > https://github.com/php/php-src/pull/1048 < > https://github.com/php/php-src/pull/1048> > > It is a fully transparent optimization of switches, by putting a new

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
On Tue, Feb 17, 2015 at 6:45 AM, François Laupretre wrote: > Hi Dmitry, > > In my mind, annotation syntax was one level lower, dealing with strings of > unknown syntax, not PHP expressions. Something like : > > '*' '@' STRING free-string-up-to-eol > > This supports : > > * @requires $a > 0 > Th

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Zeev Suraski
In a word, yes. Have to say you're abilities to compile Zeev -> formal declaration are pretty amazing :) Zeev > On 17 בפבר׳ 2015, at 08:20, Sara Golemon wrote: > >> On Mon, Feb 16, 2015 at 10:04 PM, Zeev Suraski wrote: >> That syntax poll aside, I had what I hope is some sort an enlightenmen

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Sara Golemon
On Mon, Feb 16, 2015 at 10:04 PM, Zeev Suraski wrote: > That syntax poll aside, I had what I hope is some sort an enlightenment, and > I think I know what will get me to cast my vote in favor of 'strict', as a > true supporter. There's one very special conversion that's too common in > PHP to dis

Re: [PHP-DEV] Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread Kris Craig
On Mon, Feb 16, 2015 at 7:48 PM, Larry Garfield wrote: > On 02/16/2015 10:31 AM, François Laupretre wrote: > >> >> - The leadership of the language is left to consensus, so that when >>> consensus cannot be reached, someone has to take on the role of mediator >>> / chairman / leader for the feat

Re: [PHP-DEV] Bugfest

2015-02-16 Thread Pasindu De Silva
Hi I been commenting on some bugs and putting some fixes also, dose anyone know how to get edit access on bugs? +1 On Thu, Jan 15, 2015 at 8:16 PM, Pasindu De Silva wrote: > Hi Guys > > What do you think about a folder "bugtests" with tests of all verified > bugs. > This can allows developers d

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Zeev Suraski
> -Original Message- > From: p...@golemon.com [mailto:p...@golemon.com] On Behalf Of Sara > Golemon > Sent: Tuesday, February 17, 2015 1:58 AM > To: franc...@php.net > Cc: Philip Sturgeon; Arvids Godjuks; Jefferson Gonzalez; Rowan Collins; > PHP > internals > Subject: Re: [PHP-DEV] Reviving

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Sara Golemon
On Mon, Feb 16, 2015 at 6:55 PM, Rasmus Lerdorf wrote: > I would very much like it to be my problem how my API is exposed to a > user. At the very least I should have as much control over an API > written in C as one written in PHP. > And you have that control. You expose number_format() as takin

[PHP-DEV] Re: Reviving scalar type hints

2015-02-16 Thread Theodore Brown
On Mon, Feb 16, 2015 at 18:58, Sara Golemon wrote: > If nobody else does it, I will. > > I think Andrea's 0.3 proposal was extremely well balanced, served > everyone's needs whether they would admit it or not, and who's only > failing (subjectively termed) was the use of declare().  I think > dec

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
> De : Pascal Chevrel [mailto:pascal.chev...@free.fr] > > Does it mean that in your mind the founders of the PHP language > (basically Rasmus/Zeev/Andy) have a veto right on any RFC just because > they are the founders, like in a company with shareholders? If out of > 100 votes for a feature, 97 we

Re: [PHP-DEV] Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread Larry Garfield
On 02/16/2015 10:31 AM, François Laupretre wrote: - The leadership of the language is left to consensus, so that when consensus cannot be reached, someone has to take on the role of mediator / chairman / leader for the feature, and try to push through a compromise. I have no democratic solutio

RE: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread François Laupretre
Hi Dmitry, In my mind, annotation syntax was one level lower, dealing with strings of unknown syntax, not PHP expressions. Something like : '*' '@' STRING free-string-up-to-eol This supports : * @requires $a > 0 But also : * @statement INSERT INTO ?? VALUES (13, 'Phoenix', 'AZ', 33, 112) U

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Larry Garfield
On 02/16/2015 06:58 PM, Sara Golemon wrote: On Mon, Feb 16, 2015 at 2:50 PM, François Laupretre wrote: Once again, anyone can take over version 0.3, if it is so great. Why don't you do it ? I will play the game, stop working on my proposal, and vote 'yes' again. But don't ask me to do it in yo

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Rasmus Lerdorf
On 02/16/2015 05:57 PM, Sara Golemon wrote: > On Mon, Feb 16, 2015 at 4:52 PM, Rasmus Lerdorf wrote: >> I still disagree strongly that it serves everyone's needs. The internal >> API and APIs provided by extensions are completely messed up by this >> approach. Userspace authors get the choice when

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
Arvids, I’m afraid you’re still more naive than I am. Don’t you understand it’s dead ? Even before Sara took over 0.3, they decided to revive Andrea’s v 0.1 with no change. The fight will take place between both. Our only right is to enlist in one camp and yell with the mass. We inten

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Sara Golemon
On Mon, Feb 16, 2015 at 4:52 PM, Rasmus Lerdorf wrote: > I still disagree strongly that it serves everyone's needs. The internal > API and APIs provided by extensions are completely messed up by this > approach. Userspace authors get the choice when they write their code. > Even if the caller has

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Drew Paroski
On Mon, Feb 16, 2015 at 4:52 PM, Rasmus Lerdorf wrote: > On 02/16/2015 03:58 PM, Sara Golemon wrote: >> On Mon, Feb 16, 2015 at 2:50 PM, François Laupretre wrote: >>> Once again, anyone can take over version 0.3, if it is so great. Why don't >>> you do it ? >>> I will play the game, stop working

[PHP-DEV] Re: Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread Rowan Collins
Hi Francois, Between my day job and my local user group meetup, I haven't had as much time as I'd like to read and respond to this. You've got some great suggestions here, though, so I'm going to rush through and add some thoughts before I go to bed. On 16 February 2015 at 15:31, François Laup

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Pierre Joye
On Feb 16, 2015 10:56 AM, "Dmitry Stogov" wrote: > > On Mon, Feb 16, 2015 at 7:42 PM, François Laupretre > wrote: > > > Hi, > > > > > > De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] > > > > > > The 0.1 RFC version was mentioned a lot as a good compromise by many > > > people > > > and had

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Stelian Mocanita
Thanks Sara for taking over, For myself both wrote: > On 17 February 2015 at 00:22, Nikita Popov wrote: > > > > Thank you for taking over. > > > > I like "use strict" and "declare as top-level only" most. > > That would be this no vote changed to a yes. > > And I'd also like to say thank you Sa

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Rasmus Lerdorf
On 02/16/2015 03:58 PM, Sara Golemon wrote: > On Mon, Feb 16, 2015 at 2:50 PM, François Laupretre wrote: >> Once again, anyone can take over version 0.3, if it is so great. Why don't >> you do it ? >> I will play the game, stop working on my proposal, and vote 'yes' again. >> But don't ask me to

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Dan Ackroyd
On 17 February 2015 at 00:22, Nikita Popov wrote: > > Thank you for taking over. > > I like "use strict" and "declare as top-level only" most. That would be this no vote changed to a yes. And I'd also like to say thank you Sara for taking over. cheers Dan -- PHP Internals - PHP Runtime Develo

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Nikita Popov
On Tue, Feb 17, 2015 at 12:58 AM, Sara Golemon wrote: > On Mon, Feb 16, 2015 at 2:50 PM, François Laupretre > wrote: > > Once again, anyone can take over version 0.3, if it is so great. Why > don't you do it ? > > I will play the game, stop working on my proposal, and vote 'yes' again. > > But d

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Arvids Godjuks
Might I remind everyone that time is not on our side here - feature freeze is looming and actual work has to be done. The part you must understand is: Strict type hints are possible if someone cares to implement them with a next RFC. Be our guest. Right now we need to sort out the basic stuff - the

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Pascal Chevrel
Le 16/02/2015 23:50, François Laupretre a écrit : So, IMO, the RFC is dead, whatever 2/3 or 3/4 we may have. Once it was clear that both camps would never agree, with every PHP founders against it, pushing it was useless. We're not electing a president, we're trying to ensure we make the right de

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Sara Golemon
On Mon, Feb 16, 2015 at 2:50 PM, François Laupretre wrote: > Once again, anyone can take over version 0.3, if it is so great. Why don't > you do it ? > I will play the game, stop working on my proposal, and vote 'yes' again. > But don't ask me to do it in your place. > If nobody else does it, I w

Re: [PHP-DEV] Switch jumptable optimization

2015-02-16 Thread Rasmus Lerdorf
On 02/16/2015 03:47 PM, Bob Weinand wrote: >> Am 17.02.2015 um 00:30 schrieb Rasmus Lerdorf > >: >> >> On 02/16/2015 03:04 PM, Bob Weinand wrote: >>> I'd like to show you my recent work on a jumptable optimization for >>> switches. >>> >>> https://github.com/php/php-src/p

Re: [PHP-DEV] Switch jumptable optimization

2015-02-16 Thread Bob Weinand
> Am 17.02.2015 um 00:30 schrieb Rasmus Lerdorf : > > On 02/16/2015 03:04 PM, Bob Weinand wrote: >> I'd like to show you my recent work on a jumptable optimization for switches. >> >> https://github.com/php/php-src/pull/1048 >> >> >> It is a fully tran

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Dan Ackroyd
On 16 February 2015 at 22:50, François Laupretre wrote: > it is clear that we don't have consensus on this topic. So, IMO, the RFC is > dead, whatever 2/3 or 3/4 we may have. It's okay for people to disagree about things. And we have voting to allow us to resolve those disagreements. Claiming

Re: [PHP-DEV] Switch jumptable optimization

2015-02-16 Thread Rasmus Lerdorf
On 02/16/2015 03:04 PM, Bob Weinand wrote: > I'd like to show you my recent work on a jumptable optimization for switches. > > https://github.com/php/php-src/pull/1048 > > > It is a fully transparent optimization of switches, by putting a new > ZEND_SW

Re: [PHP-DEV] Done something wrong ...

2015-02-16 Thread Lester Caine
On 16/02/15 20:24, Martin Jansen wrote: >> OK I'm working off multiple local copies of the code base so vcsclean is >> > not usable. I suspect it would wipe the eclipse project files anyway. > IIRC vcsclean essentially runs `git clean -f -X`. That last parameter is > important because it instructs

[PHP-DEV] Switch jumptable optimization

2015-02-16 Thread Bob Weinand
I'd like to show you my recent work on a jumptable optimization for switches. https://github.com/php/php-src/pull/1048 It is a fully transparent optimization of switches, by putting a new ZEND_SWITCH opcode at the top of the switch in case we can build

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
> De : Philip Sturgeon [mailto:pjsturg...@gmail.com] > > I know it is very easy for people to say "Well, that v0.3 that I > didn't like has been withdrawn, so let's just crack on and do some > other new thing. It's not so easy. It would be easier to do as you suggest. And you can still do it in y

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Andrey Andreev
Hi, On Mon, Feb 16, 2015 at 8:56 PM, Dmitry Stogov wrote: > > I would propose exactly Andrea's 0.1. > Most people were agree to support weak type hints by default. > This proposal won't prevent feature addition of optional strict type hints. Sorry, but I'll have to repeat what has been said over

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Yasuo Ohgaki
Hi Dmitry, On Mon, Feb 16, 2015 at 8:07 PM, Dmitry Stogov wrote: > 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 pr

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
On Tue, Feb 17, 2015 at 1:15 AM, Yasuo Ohgaki wrote: > Hi Dmitry, > > On Mon, Feb 16, 2015 at 8:07 PM, Dmitry Stogov wrote: > >> 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

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Yasuo Ohgaki
Hi Dmitry, On Mon, Feb 16, 2015 at 8:07 PM, Dmitry Stogov wrote: > 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 pr

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Pádraic Brady
On 16 February 2015 at 22:00, Philip Sturgeon wrote: > I know it is very easy for people to say "Well, that v0.3 that I > didn't like has been withdrawn, so let's just crack on and do some > other new thing." but I would have to ask people to consider that v0.3 > had two thirds majority, with a fe

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
Hi Dmitry De : Dmitry Stogov [mailto:dmi...@zend.com] > I would propose exactly Andrea's 0.1. > Most people were agree to support weak type hints by default. > This proposal won't prevent feature addition of optional strict type hints. > All are tired from endless arguing. Yes, but that's not e

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Pavel Kouřil
On Mon, Feb 16, 2015 at 9:50 PM, François Laupretre wrote: >> De : Pavel Kouril [mailto:pajou...@gmail.com] >> >> Hello, >> >> I know this is probably a pretty unpopular opinion in PHP (based on >> the replies I got in the other thread), but different values for >> parameters should be IMHO solved

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Philip Sturgeon
On Mon, Feb 16, 2015 at 11:42 AM, François Laupretre wrote: > Hi, >> >> De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] >> >> The 0.1 RFC version was mentioned a lot as a good compromise by many >> people >> and had major support. >> Maybe someone competent could pick it up, make necessary a

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Nikita Popov
On Mon, Feb 16, 2015 at 10:02 PM, Dmitry Stogov wrote: > > > On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei > wrote: > >> >> >> On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: >> >>> hi, >>> >>> During discussion of different ways of implementing "Design by Contract" >>> we >>> got a

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
Hi Nikita, On Tue, Feb 17, 2015 at 12:07 AM, Nikita Popov wrote: > On Mon, Feb 16, 2015 at 10:02 PM, Dmitry Stogov wrote: > >> >> >> On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei >> wrote: >> >>> >>> >>> On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: >>> hi, During

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 11:05 PM, Benjamin Eberlei wrote: > > > On Mon, Feb 16, 2015 at 12:07 PM, 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

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 10:57 PM, Derick Rethans 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 use

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Rafael Dohms
On Mon, Feb 16, 2015 at 7:41 PM, Dmitry Stogov wrote: > this won't implement features necessary for phpDocumentor, Doctrine, etc. > Just be careful here with phpDocumentor, it does not use annotations but really needs docblocks instead. Today the overlap between it and doctrine and such is just

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
> De : Pavel Kouril [mailto:pajou...@gmail.com] > > Hello, > > I know this is probably a pretty unpopular opinion in PHP (based on > the replies I got in the other thread), but different values for > parameters should be IMHO solved by method overloading and such. The question is not that it's un

RE: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
Hi, > De : morrison.l...@gmail.com [mailto:morrison.l...@gmail.com] De la part > > Also, I know people REALLY want scalar types in PHP 7.0 but honestly > all we need to do is reserve the keywords so there is no BC impact and > then we can do it at any point during the PHP 7 lifecycle. This is my

Re: [PHP-DEV] Done something wrong ...

2015-02-16 Thread Martin Jansen
On 16.02.15 20:46, Lester Caine wrote: > On 16/02/15 18:34, Ferenc Kovacs wrote: >> On Mon, Feb 16, 2015 at 6:55 PM, Lester Caine wrote: >>> /srv/repo/php-src_master/ext/opcache/ZendAccelerator.c:2005:19: error: >>> ‘zend_array’ has no member named ‘pDestructor’ >>> Seems to be due to changes for

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 12:07 PM, 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 propo

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Derick Rethans
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 tim

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Levi Morrison
On Mon, Feb 16, 2015 at 9:42 AM, François Laupretre wrote: > Hi, >> >> De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] >> >> The 0.1 RFC version was mentioned a lot as a good compromise by many >> people >> and had major support. >> Maybe someone competent could pick it up, make necessary ad

Re: [PHP-DEV] Done something wrong ...

2015-02-16 Thread Lester Caine
On 16/02/15 18:34, Ferenc Kovacs wrote: > On Mon, Feb 16, 2015 at 6:55 PM, Lester Caine wrote: > >> I've synced with current git and seem to have the files I expect for >> interbase, but when trying to run a clean build of the core stuff it no >> longer compiles ... >> >> For example >> /srv/repo

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Pavel Kouřil
On Mon, Feb 16, 2015 at 5:42 PM, François Laupretre wrote: > Hi, > > - the fact that the RFC supports single types only, like the previous 'return > type' RFC. While it is easier to implement, it opens several issues as > multiply-typed arguments are an integral part of the PHP language (mostly

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Pavel Kouřil
On Mon, Feb 16, 2015 at 1:33 PM, Benjamin Eberlei wrote: > > > On Mon, Feb 16, 2015 at 1:17 PM, Pavel Kouřil wrote: >> >> On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: >> > hi, >> > >> > During discussion of different ways of implementing "Design by Contract" >> > we >> > got an idea of

Re: [PHP-DEV] filter_var doesn't support international email addresses

2015-02-16 Thread j adams
Rowan, thanks for your response. Wow that regex is pretty intense. A new filter type sounds like a reasonable idea to me. I'm not sure if I'll be able to offer any improvements myself (although I will look into it shortly here). I I do know that Google announced last August that they plan to suppo

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 7:42 PM, François Laupretre wrote: > Hi, > > > > De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] > > > > The 0.1 RFC version was mentioned a lot as a good compromise by many > > people > > and had major support. > > Maybe someone competent could pick it up, make nece

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Rowan Collins
Dmitry Stogov wrote on 16/02/2015 18:41: this won't implement features necessary for phpDocumentor, Doctrine, etc. I know. Like I say, it's just a way of keeping things moving, rather than saying "eh, maybe next year". It allows us to formally agree the feature, the roadmap, the basic synt

Re: [PHP-DEV] Re: I quit.

2015-02-16 Thread Sven Drieling
Am Mon, 16 Feb 2015 18:00:41 +0200 schrieb Arvids Godjuks : Hallo, > Right now we need a breakthrough event - get type hints into the language > at all. The most sensible thing to do it is to add basic type hints that > work like the current conversion rules, maybe add some notices/warnings for >

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 8:41 PM, Stanislav Malyshev wrote: > Hi! > > > The test there is self explainable. Of course, annotations just provide > > a way to add metadata, but doesn't define attribute names or the ways > > they are going to be used. Only Reflection API to read. > > Looks fine, but

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
this won't implement features necessary for phpDocumentor, Doctrine, etc. On Mon, Feb 16, 2015 at 8:29 PM, Rowan Collins wrote: > On Mon, Feb 16, 2015 at 6:41 PM, Rowan Collins > wrote: > >Is there any value in deciding the initial syntax for 7.0, and >i

Re: [PHP-DEV] Done something wrong ...

2015-02-16 Thread Ferenc Kovacs
On Mon, Feb 16, 2015 at 6:55 PM, Lester Caine wrote: > I've synced with current git and seem to have the files I expect for > interbase, but when trying to run a clean build of the core stuff it no > longer compiles ... > > For example > /srv/repo/php-src_master/ext/opcache/ZendAccelerator.c:2005

[PHP-DEV] [RFC] [VOTE] Remove the date.timezone warning

2015-02-16 Thread Bob Weinand
As announced yesterday, I put the RFC into vote now. Voting period is 8 days, it will end 24th of February. The RFC is here: https://wiki.php.net/rfc/date.timezone_warning_removal I also slightly reworded the feedback section in reply to t

[PHP-DEV] Done something wrong ...

2015-02-16 Thread Lester Caine
I've synced with current git and seem to have the files I expect for interbase, but when trying to run a clean build of the core stuff it no longer compiles ... For example /srv/repo/php-src_master/ext/opcache/ZendAccelerator.c:2005:19: error: ‘zend_array’ has no member named ‘pDestructor’ Seems t

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Stanislav Malyshev
Hi! > The test there is self explainable. Of course, annotations just provide > a way to add metadata, but doesn't define attribute names or the ways > they are going to be used. Only Reflection API to read. Looks fine, but I'm not sure how one can use the AST that the reflection returns. Is it f

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Rowan Collins
On Mon, Feb 16, 2015 at 6:41 PM, Rowan Collins > wrote: Is there any value in deciding the initial syntax for 7.0, and implementing only non-parameterised annotations, i.e. you can call hasAnnotation(string): bool but nothing else? Dmitry Stogov wrote on

[PHP-DEV] Re: Reviving scalar type hints

2015-02-16 Thread Arvids Godjuks
2015-02-16 18:42 GMT+02:00 François Laupretre : > Hi, > > > > De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] > > > > The 0.1 RFC version was mentioned a lot as a good compromise by many > > people > > and had major support. > > Maybe someone competent could pick it up, make necessary adjust

Re: [PHP-DEV] Reviving scalar type hints

2015-02-16 Thread Peter Cowburn
On 16 February 2015 at 16:42, François Laupretre wrote: > Hi, > > > > De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] > > > > The 0.1 RFC version was mentioned a lot as a good compromise by many > > people > > and had major support. > > Maybe someone competent could pick it up, make necessa

[PHP-DEV] Reviving scalar type hints

2015-02-16 Thread François Laupretre
Hi, > > De : Arvids Godjuks [mailto:arvids.godj...@gmail.com] > > The 0.1 RFC version was mentioned a lot as a good compromise by many > people > and had major support. > Maybe someone competent could pick it up, make necessary adjustments > that > where required and let people vote on it? Start w

Re: [PHP-DEV] Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread Johannes Schlüter
On Mon, 2015-02-16 at 16:31 +0100, François Laupretre wrote: > > De : Rowan Collins [mailto:rowan.coll...@gmail.com] > > > > Saying "that's enough" isn't even a productive comment. Enough what? > > What is it you are asking to happen next? > > Maybe an initiative to write an RFC about the rules we

Re: [PHP-DEV] Re: I quit.

2015-02-16 Thread Daniel Lowrey
On Mon, Feb 16, 2015 at 11:00 AM, Arvids Godjuks wrote: > This bickering already jeopardized the type hinting RFC's how many times? 3 as I recall? Zeev was kind enough to reach out privately prior to your message and we began exchanged mails trying to better understand each other's point of view

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
this will work, of course, and robust implementation wouldn't take more than a day :) but it'll require user-level parser again. no big advantage in comparison to doc-block. Thanks. Dmitry. On Mon, Feb 16, 2015 at 6:41 PM, Rowan Collins wrote: > Nikita Popov wrote on 16/02/2015 12:14: > >> I

Re: [PHP-DEV] Re: I quit.

2015-02-16 Thread Arvids Godjuks
2015-02-16 17:26 GMT+02:00 Daniel Lowrey : > On Mon, Feb 16, 2015 at 10:19 AM, Zeev Suraski wrote: > > > > > -Original Message- > > > From: rdlow...@gmail.com [mailto:rdlow...@gmail.com] On Behalf Of > > > Daniel Lowrey > > > Sent: Monday, February 16, 2015 5:13 PM > > > To: internals@lis

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 5:21 PM, Anthony Ferrara wrote: > Dmitry, > > On Mon, Feb 16, 2015 at 9:12 AM, Dmitry Stogov wrote: > > > >> > The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict > or > >> > weak check doesn't make any difference for "fast path" (the same 2-3 > >> > ins

Re: [PHP-DEV] Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread Lester Caine
On 16/02/15 15:31, François Laupretre wrote: >> - There is a lack of expertise at the core level of the code, so >> > collaboration on each feature is low. RFCs tend to have a single >> > sponsor, who has to see the whole process through to the end. > - One thing we can encourage, while indirect in

Re: [PHP-DEV] RFC: Expectations

2015-02-16 Thread Dmitry Stogov
Hi Nikita, it looks like a part of old implementation is not trivial with new AST compiler. previously we translated assert(condition) into assert(condition, "assert(condition)"). actually we just captured a part of input buffer and added missing string argument. Is there a simple way to do the

Re: [PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Rowan Collins
Nikita Popov wrote on 16/02/2015 12:14: I think this is a great idea, but we should postpone it to PHP 7.1. Especially if you want to make this AST based (which would require both stabilizing the AST we return for expressions and having APIs to do codegen based on the AST) it will require a lot o

[PHP-DEV] Proposing [constructive] solutions (was: I quit)

2015-02-16 Thread François Laupretre
> De : Rowan Collins [mailto:rowan.coll...@gmail.com] > > Saying "that's enough" isn't even a productive comment. Enough what? > What is it you are asking to happen next? Maybe an initiative to write an RFC about the rules we should follow when writing to the list. People who agree could show the

Re: [PHP-DEV] Re: I quit.

2015-02-16 Thread Daniel Lowrey
On Mon, Feb 16, 2015 at 10:19 AM, Zeev Suraski wrote: > > > -Original Message- > > From: rdlow...@gmail.com [mailto:rdlow...@gmail.com] On Behalf Of > > Daniel Lowrey > > Sent: Monday, February 16, 2015 5:13 PM > > To: internals@lists.php.net > > Subject: [PHP-DEV] Re: I quit. > > > > > Th

RE: [PHP-DEV] Re: I quit.

2015-02-16 Thread Zeev Suraski
> -Original Message- > From: rdlow...@gmail.com [mailto:rdlow...@gmail.com] On Behalf Of > Daniel Lowrey > Sent: Monday, February 16, 2015 5:13 PM > To: internals@lists.php.net > Subject: [PHP-DEV] Re: I quit. > > > The 0.1 RFC version was mentioned a lot as a good compromise by many > > pe

[PHP-DEV] Re: I quit.

2015-02-16 Thread Daniel Lowrey
> The 0.1 RFC version was mentioned a lot as a good compromise by many > people and had major support. People keep saying this like it's a thing, but I and others are vehemently opposed to this as a solution. The only thing weak hints accomplishes is the illusion of safety without actually providi

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Pierre Joye
On Mon, Feb 16, 2015 at 3:07 AM, Dmitry Stogov wrote: > hi, > > During discussion of different ways of implementing "Design by Contract" we > got an idea of using annotations. Thanks a lot to push that forward! > BTW: annotations are useful by their own and may be used for different > purposes.

Re: [PHP-DEV] I quit.

2015-02-16 Thread Arvids Godjuks
The 0.1 RFC version was mentioned a lot as a good compromise by many people and had major support. Maybe someone competent could pick it up, make necessary adjustments that where required and let people vote on it? Start with small steps - get the weak type hints into the language first, see how it

Re: [PHP-DEV] I quit.

2015-02-16 Thread Jefferson Gonzalez
You're right. I am probably expressing my own frustration when I imagine that withdrawing four important RFC s a few days before vote ends has little to do with time management issues. Let's stay politically correct and don't express anything about the atmosphere in the community, which has no

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Anthony Ferrara
Dmitry, On Mon, Feb 16, 2015 at 9:12 AM, Dmitry Stogov wrote: > >> > The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict or >> > weak check doesn't make any difference for "fast path" (the same 2-3 >> > instructions). The slow patch for weak checks is going to be a bit more >> >

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Dmitry Stogov
> > The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict or > > weak check doesn't make any difference for "fast path" (the same 2-3 > > instructions). The slow patch for weak checks is going to be a bit more > > expensive. > > Well, not really. It's 2-3 CPU instructions once you h

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Anthony Ferrara
Dmitry and Joe, On Mon, Feb 16, 2015 at 1:59 AM, Dmitry Stogov wrote: > > > On Mon, Feb 16, 2015 at 12:45 AM, Anthony Ferrara > wrote: >> Well, if you know the destination function at compile time, you don't >> need to generate generic code. you can generate a direct dispatch >> (asm-level funct

Re: [PHP-DEV] Spaceship operator RFC

2015-02-16 Thread Stanislav Malyshev
Hi! > One thing of note is that I didn’t write a language specification > patch. If you’re to pick it up, I guess you’d have to do that at some > point, sorry about that. No problem, I'll take care of it, thanks for the reminder. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Run

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Cesar Rodas
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 annotation

Re: [PHP-DEV] I quit.

2015-02-16 Thread Rowan Collins
François Laupretre wrote on 16/02/2015 12:27: De : Rowan Collins [mailto:rowan.coll...@gmail.com] Please can we take Andrea at her word: > This isn’t a judgement of the PHP community nor the internals mailing list, you’re all wonderful people and it’s really been a pleasure, and I mean that c

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
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 wrote: > > On 16/02/15 13:40, Alexander Lisachenko wrote: > > 2015-02-16 15:31 GMT+03:00 Benjamin Eberlei : > > >

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
our approach is more powerfull, and HHVM syntax is not sufficient. Also looks better than <>. anyway, syntax decorators are discussable. Thanks. Dmitry. On Mon, Feb 16, 2015 at 3:19 PM, Dennis Birkholz wrote: > Hi, > > Am 16.02.2015 um 12:07 schrieb Dmitry Stogov: > > HHVM already implemented

[PHP-DEV] Re: Annotations in PHP7

2015-02-16 Thread Dmitry Stogov
The implementation is not going to be simple, and taking in account other tasks, it may be difficult to provide high-quality implementation. Lets look if it's really a desirable feature. Then I may do all my best, or forget about it by 7.1. Thanks. Dmitry. On Mon, Feb 16, 2015 at 3:14 PM, Nikita

Re: [PHP-DEV] Spaceship operator RFC

2015-02-16 Thread Andrea Faulds
Hi Stas, > On 16 Feb 2015, at 05:20, Stanislav Malyshev wrote: > > Since Andrea has withdrawn the spaceship operator RFC > (https://wiki.php.net/rfc/combined-comparison-operator), I'd like to > resurrect it. Looks like by vote results (with 1 day of official vote > left) it was clearly passing,

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Cesar Rodas
On 16/02/15 13:40, Alexander Lisachenko wrote: > 2015-02-16 15:31 GMT+03:00 Benjamin Eberlei : > >> 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

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Alexander Lisachenko
2015-02-16 15:31 GMT+03:00 Benjamin Eberlei : > > 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 > delayed to 7.1 becaus

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 1:17 PM, Pavel Kouřil wrote: > On Mon, Feb 16, 2015 at 12:07 PM, 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 m

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
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 : > >> 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/ffcfdec4c46e01

  1   2   >