[PHP-DEV] Proposal: shorthand syntax for initializing arbitrary-precision ("bigint") numbers?

2020-08-07 Thread tyson andre
Hi internals, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt was a similar approach another dynamically typed language recently took to support convenient arbitrary precision. What are your thoughts on making `123_456_000_000_000_000_000_000n` a shorthand

Re: [PHP-DEV] Putting the match expression in constant expressions in PHP 8.0 or 8.1

2020-08-07 Thread Gabriel Caruso
On Sat, 8 Aug 2020 at 02:22, tyson andre wrote: > Hi internals, > > The match expression can be thought of as a much more concise/readable > equivalent to chained ternary operators. > I'm proposing allowing matches in constant expressions when all parts of > the match are constant expressions. >

[PHP-DEV] Putting the match expression in constant expressions in PHP 8.0 or 8.1

2020-08-07 Thread tyson andre
Hi internals, The match expression can be thought of as a much more concise/readable equivalent to chained ternary operators. I'm proposing allowing matches in constant expressions when all parts of the match are constant expressions. For example, these two class constants would have

Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2

2020-08-07 Thread Theodore Brown
On Fri, Aug 7, 2020 at 6:03 AM Derick Rethans wrote: > On Fri, 7 Aug 2020, Theodore Brown wrote: > > > Even if we assume the implementation is only about 30 lines, it's > > still extra complexity that I don't understand the benefit of. I > > sincerely would like to know what advantage there is

Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2

2020-08-07 Thread Theodore Brown
On Fri, Aug 7, 2020 at 3:32 AM Benjamin Eberlei wrote: > On Fri, Aug 7, 2020 at 2:24 AM Theodore Brown wrote: > > On Thu, Aug 6, 2020 at 12:30 PM Benas IML > > > wrote: > > > > > Hey Theodore, > > > > > > On Thu, Aug 6, 2020, 8:05 PM Theodore Brown > > > > wrote: > > > > > > > While none

Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2

2020-08-07 Thread Rowan Tommins
On Fri, 7 Aug 2020 at 12:03, Derick Rethans wrote: > > You still haven't addressed any of the deficiencies that the other > alternatives don't have: > https://wiki.php.net/rfc/shorter_attribute_syntax_change#proposal > That table would be a lot more useful to steer the discussion if it was

Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2

2020-08-07 Thread Derick Rethans
On Fri, 7 Aug 2020, Theodore Brown wrote: > On Thu, Aug 6, 2020 at 12:30 PM Benas IML wrote: > > > On Thu, Aug 6, 2020, 8:05 PM Theodore Brown wrote: > > > > > While none of our syntax options are perfect, I believe @@ has the > > > best long-term tradeoffs because: > > > > > > - It doesn't

Re: [PHP-DEV] [RFC] Shorter Attribute Syntax Change RFC 0.2

2020-08-07 Thread Benjamin Eberlei
On Fri, Aug 7, 2020 at 2:24 AM Theodore Brown wrote: > On Thu, Aug 6, 2020 at 12:30 PM Benas IML > wrote: > > > Hey Theodore, > > > > On Thu, Aug 6, 2020, 8:05 PM Theodore Brown > wrote: > > > > > While none of our syntax options are perfect, I believe @@ has the > > > best long-term tradeoffs