[PHP-DEV] Union Type (singular) straw man proposal

2019-09-04 Thread Mike Schinkel
Hello all, I'll start by saying I've been lurking for about six weeks and reading everything on the list since then although I was on the list for a short period many years ago. I recently took on a role as "WordPress Engineering Team Lead" and as such have gotten much more interested in rev

Re: [PHP-DEV] MODERATE spam

2019-09-04 Thread Sascha Schumann
Looking good (test 3). Please alert syst...@php.net if you have issues sending emails to *@lists.php.net. Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] MODERATE spam

2019-09-04 Thread Sascha Schumann
And this would be test message 2. Sorry about this. Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] MODERATE spam

2019-09-04 Thread Sascha Schumann
We have enabled the normal php.net spam protections for lists.php.net - this is test message 1. Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] MODERATE spam

2019-09-04 Thread Sascha Schumann
When sending an email to php-announce@ .. ezmlm-store:_info:_qp_26188/ezmlm-clean:_info:_qp_26206/Old_format_or_corrupted_index._Run_ezmlm-idx!_(#5.3.0)/ezmlm-warn:_info:_qp_26212/ezmlm-warn:_info:_qp_26219/ezmlm-warn:_info:_qp_26220/did_0+0+10/ I ran ezmlm-idx, looks better now. Regarding deliv

Re: [PHP-DEV] [RFC] Namespace-scoped declares, again

2019-09-04 Thread Andreas Hennings
I would like to make a wild proposal. ## Proposal Similar to spl_autoload_register(), we would provide a function that allows to register a callback to provide the declares / edition / compatibility information for a given file, before this file is loaded. To address performance concerns: - The

Re: [PHP-DEV] Silent Types

2019-09-04 Thread M. W. Moe
Hello, this would be very possible constant with the actual without breaking BC allow declare var = value : type; -> throws if assignment + type fails the grammar context is exactly the same than a function return. Best. On Wed, Sep 4, 2019 at 10:18 AM Andreas Hennings wrote: > On Wed, 4 Se

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Andreas Hennings
On Wed, 4 Sep 2019 at 09:22, Lynn wrote: > > Note that this behavior would require making some decisions whether or not > in the future this opt-in behavior should change when a default value is > given, such as with C# and type inference when declaring a variable, based > on its assigned value.

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Andreas Hennings
On Wed, 4 Sep 2019 at 18:09, Ben Ramsey wrote: > > > Andreas Hennings wrote: > > > > In some other languages the mixed type is called "variant". > > https://en.m.wikipedia.org/wiki/Variant_type > > I mostly remember it from VisualBasic. > > Union types are probably better than specifying a variant

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Ben Ramsey
> Andreas Hennings wrote: > > In some other languages the mixed type is called "variant". > https://en.m.wikipedia.org/wiki/Variant_type > I mostly remember it from VisualBasic. Union types are probably better than specifying a variant or mixed type. At present, parameters and properties with no

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Larry Garfield
On Wed, Sep 4, 2019, at 2:21 AM, Lynn wrote: > Hi, > > Would this warrant a having mixed types? By making every variable of type > "mixed" when no type is defined, regardless of what value it receives or is > initialized with, this would make an opt-in system. This behavior would > cater developer

Re: [PHP-DEV] Windows builds of PHP 7.4+ use Visual Studio 2019

2019-09-04 Thread Christoph M. Becker
On 04.09.2019 at 15:23, Björn Larsson wrote: > Den 2019-06-06 kl. 14:11, skrev Christoph M. Becker: > >> I like to inform you, that the official Windows builds of PHP 7.4 and >> master (available from windows.php.net; currently only snapshot builds, >> of course) are done with Visual Studio 2019. 

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Claude Pache
> Le 4 sept. 2019 à 13:54, Dan Ackroyd a écrit : > >> >> if we were to use "?int" instead, the engine would force the >> community to add "return null;" > > That sounds like a bug to me. The fact that null is returned by any > function that lacks an explicit return value, is well-defined, and

Re: [PHP-DEV] Windows builds of PHP 7.4+ use Visual Studio 2019

2019-09-04 Thread Björn Larsson
Den 2019-06-06 kl. 14:11, skrev Christoph M. Becker: Hi, I like to inform you, that the official Windows builds of PHP 7.4 and master (available from windows.php.net; currently only snapshot builds, of course) are done with Visual Studio 2019. While it is still possible to build these PHP versi

[PHP-DEV] PHP 7 + bcgen extension + PHAR extension

2019-09-04 Thread Henrik Skov
Hi ! I hope this is the right mailing list to post my request to. I found a port of bcompiler here: https://github.com/vjardin/bcgen/ which is PHP7 compatible. By mailing here, I am trying to reach out to the authors of the PHAR extension since the author(s) of bcgen have said that they don'

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Dan Ackroyd
On Wed, 4 Sep 2019 at 10:59, Nicolas Grekas wrote: > we use "@return $this" quite often. On the implementation side, I'd > suggest enforcing this at compile time only (enforce all return points are > explicit, and written as "return $this" That's doing a deeper level of thing than a type system

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Peter Bowyer
On Wed, 4 Sep 2019 at 12:30, Arnold Daniels wrote: > Instead of using `__toString` as type maybe it's better to introduce a > `Stringable` interface, similar to how `__wakeup` and `__sleep` are already > superseded by `Serializable`. I support that. I don't like the naming in `string|__toStrin

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Arnold Daniels
Instead of using `__toString` as type maybe it's better to introduce a `Stringable` interface, similar to how `__wakeup` and `__sleep` are already superseded by `Serializable`. Of course `__toString` would still continue to work (for bc), but isn't usable for type hinting. [Arnold Daniels - Cha

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Matthew Brown
- Agree on the usefulness of a stringable meta-type. - Hack supports an explicit “: this” return type (without dollar) when returning “new static(...)”. I think I might prefer that to “: static”. - From a type perspective, I don’t understand the “int|void” idea - it might make your users’ life

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Nicolas Grekas
> > https://github.com/nikic/php-rfcs/blob/union-types/rfcs/-union-types-v2.md Thank you Nikita, this would be a hugely welcomed step forward! Can't wait to get rid of all those docblock annotations! I've some additional suggestions that would greatly help remove more docblocks and provide e

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Aegir Leet
On the subject of using GitHub for this RFC: Personally, I think GitHub is a much better platform than the mailing list for this kind of discussion. Mailing list threads are just not very accessible to the average PHP user. Reading them through externals.io is an OK experience, but actually con

Re: [PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Marco Pivetta
Hey Nikita, On Wed, Sep 4, 2019 at 10:26 AM Nikita Popov wrote: > Hi internals, > > I'd like to start the discussion on union types again, with a new proposal: > > Pull Request: https://github.com/php/php-rfcs/pull/1 > Rendered Proposal: > > https://github.com/nikic/php-rfcs/blob/union-types/rfc

[PHP-DEV] [RFC] Union Types v2

2019-09-04 Thread Nikita Popov
Hi internals, I'd like to start the discussion on union types again, with a new proposal: Pull Request: https://github.com/php/php-rfcs/pull/1 Rendered Proposal: https://github.com/nikic/php-rfcs/blob/union-types/rfcs/-union-types-v2.md As an experiment, I'm submitting this RFC as a GitHub p

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Andreas Hennings
In some other languages the mixed type is called "variant". https://en.m.wikipedia.org/wiki/Variant_type I mostly remember it from VisualBasic. Lynn schrieb am Mi., 4. Sep. 2019, 09:22: > Hi, > > Would this warrant a having mixed types? By making every variable of type > "mixed" when no type is

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Lynn
Hi, Would this warrant a having mixed types? By making every variable of type "mixed" when no type is defined, regardless of what value it receives or is initialized with, this would make an opt-in system. This behavior would cater developers who prefer only strict types, only dynamic types, and t