Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Lester Caine
On 02/02/15 08:53, Matteo Beccati wrote: >> I think v0.1 had pretty good chances to get accepted, but I’m not so >> sure about anything that followed. >> I’m definitely -1 on declare(strict). > > I agree. I understand that someone might prefer strict typing, but > declare() seems so different from

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Andrey, > On 2 Feb 2015, at 08:55, Andrey Andreev wrote: > > Hi, > >> On Mon, Feb 2, 2015 at 10:41 AM, Andrea Faulds wrote: >> Hi Dmitry, >> >>> On 2 Feb 2015, at 07:02, Dmitry Stogov wrote: >>> >>> As I already told, in my opinion, version 0.1 was the perfect solution that >>> fit into

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Thomas Bley
what about giving several voting options? yes/no for scalar type hints and yes/no for declare-strict Regards Thomas Michael Wallner schrieb am 2. Feb 2015 09:49: > >> On 02 02 2015, at 00:49, Andrea Faulds wrote: >> >> Good evening, >> >> The RFC has been updated to cover return types, sinc

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrey Andreev
Hi Andrea, On Mon, Feb 2, 2015 at 11:05 AM, Andrea Faulds wrote: > > Hi Andrey, > >> On 2 Feb 2015, at 08:55, Andrey Andreev wrote: >> >> Hi, >> >>> On Mon, Feb 2, 2015 at 10:41 AM, Andrea Faulds wrote: >>> Hi Dmitry, >>> On 2 Feb 2015, at 07:02, Dmitry Stogov wrote: As I alread

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Dmitry Stogov
On Mon, Feb 2, 2015 at 11:41 AM, Andrea Faulds wrote: > Hi Dmitry, > > > On 2 Feb 2015, at 07:02, Dmitry Stogov wrote: > > > > As I already told, in my opinion, version 0.1 was the perfect solution > that > > fit into PHP semantic very well. > > I don't like the original. Weak types work to a de

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Markus Fischer
Hello Andrea, On 02.02.15 00:49, Andrea Faulds wrote: > The RFC has been updated to cover return types, since Levi’s Return Types RFC > has passed. The patch is a work in progress: it works, but lacks tests for > return types. > > Version 0.3 of the RFC can be found here: > https://wiki.php.ne

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Markus, > On 2 Feb 2015, at 14:25, Markus Fischer wrote: > > - Since consensus on the strict mode does part the community (or, the > greater community also outside @internals) my impression is that the > current best way to move forward would be > > - get the rfc to only go for weak types fo

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrey Andreev
Hi, On Mon, Feb 2, 2015 at 6:17 PM, Andrea Faulds wrote: > Hi Markus, > >> On 2 Feb 2015, at 14:25, Markus Fischer wrote: >> >> - Since consensus on the strict mode does part the community (or, the >> greater community also outside @internals) my impression is that the >> current best way to mov

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Dmitry, > On 2 Feb 2015, at 09:24, Dmitry Stogov wrote: > > > Will we able to call the same function using weak > > type hinting from on file and with strict from the other? > > Yes, for the parameter type hints anyway. That means that strict and weak > code is interoperable without enforci

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Derick Rethans
On Mon, 2 Feb 2015, Dmitry Stogov wrote: > As I already told, in my opinion, version 0.1 was the perfect solution that > fit into PHP semantic very well. > > declare(strict_types=1); - is really weird solution. > It changes type hinting behavior per file scope, so, just to try strict > type hinti

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hey Derick, > On 2 Feb 2015, at 16:35, Derick Rethans wrote: > > On Mon, 2 Feb 2015, Dmitry Stogov wrote: > >> As I already told, in my opinion, version 0.1 was the perfect solution that >> fit into PHP semantic very well. >> >> declare(strict_types=1); - is really weird solution. >> It change

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Matthew Leverton
On Sun, Feb 1, 2015 at 5:49 PM, Andrea Faulds wrote: > Good evening, > > The RFC has been updated to cover return types, since Levi’s Return Types RFC > has passed. The patch is a work in progress: it works, but lacks tests for > return types. > > Version 0.3 of the RFC can be found here: > htt

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrey Andreev
Hi, On Mon, Feb 2, 2015 at 6:39 PM, Andrea Faulds wrote: > Hey Derick, > >> On 2 Feb 2015, at 16:35, Derick Rethans wrote: >> >> On Mon, 2 Feb 2015, Dmitry Stogov wrote: >> >>> As I already told, in my opinion, version 0.1 was the perfect solution that >>> fit into PHP semantic very well. >>> >>

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Matthew, > On 2 Feb 2015, at 16:45, Matthew Leverton wrote: > > On Sun, Feb 1, 2015 at 5:49 PM, Andrea Faulds wrote: >> Good evening, >> >> The RFC has been updated to cover return types, since Levi’s Return Types >> RFC has passed. The patch is a work in progress: it works, but lacks test

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Andrey, > On 2 Feb 2015, at 16:48, Andrey Andreev wrote: > > As already said, we're just going around in circles at this point, but > a migration issue? > > Whatever code using the scalar type hints should be *new* code in > userland. Why not existing userland code? If only new code adds ty

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrey Andreev
Hi, On Mon, Feb 2, 2015 at 6:52 PM, Andrea Faulds wrote: > Hi Andrey, > >> On 2 Feb 2015, at 16:48, Andrey Andreev wrote: >> >> As already said, we're just going around in circles at this point, but >> a migration issue? >> >> Whatever code using the scalar type hints should be *new* code in >>

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Andrey, > On 2 Feb 2015, at 16:57, Andrey Andreev wrote: > > On Mon, Feb 2, 2015 at 6:52 PM, Andrea Faulds wrote: >> Hi Andrey, >> >>> On 2 Feb 2015, at 16:48, Andrey Andreev wrote: >>> >>> As already said, we're just going around in circles at this point, but >>> a migration issue? >>>

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Alain Williams
On Mon, Feb 02, 2015 at 05:00:08PM +, Andrea Faulds wrote: > Hi Andrey, > ... Just to give thanks to Andrea on persisting with a highly contentious RFC, one that has defeated several others over the years. I hope that we will end up with something acceptable to most and will be able to finally

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrey Andreev
On Mon, Feb 2, 2015 at 7:00 PM, Andrea Faulds wrote: > Hi Andrey, > >> On 2 Feb 2015, at 16:57, Andrey Andreev wrote: >> >> On Mon, Feb 2, 2015 at 6:52 PM, Andrea Faulds wrote: >>> Hi Andrey, >>> On 2 Feb 2015, at 16:48, Andrey Andreev wrote: As already said, we're just going aro

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Dmitry Stogov
So, one of the advantages of strict type hinting is the ability to catch potential errors. For example when we pass 67 to setBody(string $message). Thanks. Dmitry. On Mon, Feb 2, 2015 at 7:30 PM, Andrea Faulds wrote: > Hi Dmitry, > > > On 2 Feb 2015, at 09:24, Dmitry Stogov wrote: > > > > > W

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Dmitry, > On 2 Feb 2015, at 18:22, Dmitry Stogov wrote: > > So, one of the advantages of strict type hinting is the ability to catch > potential errors. > For example when we pass 67 to setBody(string $message). Yes, that sort of thing is easily caught by strict type checks. They’re also a

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread S.A.N
2015-02-02 21:12 GMT+02:00 Andrea Faulds : > Hi Dmitry, > >> On 2 Feb 2015, at 18:22, Dmitry Stogov wrote: >> >> So, one of the advantages of strict type hinting is the ability to catch >> potential errors. >> For example when we pass 67 to setBody(string $message). > > Yes, that sort of thing is

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Dmitry Stogov
On Mon, Feb 2, 2015 at 10:12 PM, Andrea Faulds wrote: > Hi Dmitry, > > > On 2 Feb 2015, at 18:22, Dmitry Stogov wrote: > > > > So, one of the advantages of strict type hinting is the ability to catch > potential errors. > > For example when we pass 67 to setBody(string $message). > > Yes, that s

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hi Dmitry, > On 2 Feb 2015, at 19:26, Dmitry Stogov wrote: > > Agree. Strict type checks are simple and may be implemented more efficient. > But in case we have to support both - weak and strict, this won't make any > advantage. I think this still works even if we support both. The RFC’s appro

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-02 Thread Andrea Faulds
Hey everyone, > On 2 Feb 2015, at 16:50, Andrea Faulds wrote: > > The implementation does work for testing. I still need to write tests for > return types but they seem to work. Parameter types are fully-working, > though, and they have extensive tests, so I know they’re working fine and you

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-03 Thread Dmitry Stogov
Hi Andrea, In you proposal you disable declaration of classes with names, that may be used for scalar type hints - Int, Float, ... What do you think about using only lowercase type names for scalar type hints? In this case we won't have to introduce any limitations. function foo(int $a) // expe

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-03 Thread Sebastian Bergmann
Am 04.02.2015 um 06:44 schrieb Dmitry Stogov: > What do you think about using only lowercase type names for scalar type > hints? In this case we won't have to introduce any limitations. This would be inconsistent with the rest of PHP being case-insensitive and only lead to confusion. -- PHP I

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-04 Thread Andrea Faulds
Hi Dmitry and Sebastian, > On 4 Feb 2015, at 05:49, Sebastian Bergmann wrote: > > Am 04.02.2015 um 06:44 schrieb Dmitry Stogov: >> What do you think about using only lowercase type names for scalar type >> hints? In this case we won't have to introduce any limitations. > > This would be inconsi

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-04 Thread Rowan Collins
On 2 February 2015 17:09:30 GMT, Alain Williams wrote: >On Mon, Feb 02, 2015 at 05:00:08PM +, Andrea Faulds wrote: >> Hi Andrey, >> ... > >Just to give thanks to Andrea on persisting with a highly contentious >RFC, one >that has defeated several others over the years. I hope that we will >end

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-09 Thread André Rømcke
> > On 02 Feb 2015, at 17:35 , Derick Rethans wrote: > > On Mon, 2 Feb 2015, Dmitry Stogov wrote: > >> As I already told, in my opinion, version 0.1 was the perfect solution that >> fit into PHP semantic very well. >> >> declare(strict_types=1); - is really weird solution. >> It changes type h

<    1   2   3