Re: [PHP-DEV] Final properties

2016-04-11 Thread Quim Calpe
There is a concept in storage devices that fits: Write Once Read Many (WORM) https://en.wikipedia.org/wiki/Write_once_read_many final class Value { public worm $name; public function __construct(string $name) { $this->name = $name; } } I'm not aware of any programming language

Re: [PHP-DEV] [RFC:generics]

2016-04-20 Thread Quim Calpe
On Wed, Apr 20, 2016 at 11:10 AM, Dominic Grostate < codekest...@googlemail.com> wrote: > I've made an amendment to the RFC to clarify on the Nested Types, which is > indeed supposed to be part of the feature. Rasmus may want to reword it if > it isn't very clear. > > Regarding union and intersec

Re: [PHP-DEV] [RFC] Nullable Types

2016-04-22 Thread Quim Calpe
On Thu, Apr 21, 2016 at 9:52 PM, Fleshgrinder wrote: > On 4/21/2016 1:00 PM, Lin Yo-An wrote: > > I think this is not to make PHP like Java, and it totally makes sense - > > Nullable should be a type of a type instead of a state. In Haskell it's > > named Maybe or Option, and It's better than Nul

Re: [PHP-DEV] [RFC] Nullable Types

2016-04-23 Thread Quim Calpe
Hi Richard, On Sat, Apr 23, 2016 at 2:30 PM, Fleshgrinder wrote: > On 4/22/2016 11:42 AM, Quim Calpe wrote: > > IMHO, the point of Optional types is the intention, if you get an > > Option from a method, you have to deal with a None branch. Of course > > you can just unwra

Re: [PHP-DEV] [RFC] Nullable Types

2016-04-23 Thread Quim Calpe
On Sat, Apr 23, 2016 at 6:58 PM, Levi Morrison wrote: > On Sat, Apr 23, 2016 at 10:40 AM, Quim Calpe wrote: > > Hi Richard, > > > > On Sat, Apr 23, 2016 at 2:30 PM, Fleshgrinder > wrote: > > > >> On 4/22/2016 11:42 AM, Quim Calpe wrote: > >> >

Re: [PHP-DEV] Re: [RFC][VOTE] Nullable Types

2016-05-11 Thread Quim Calpe
On Wed, May 11, 2016 at 12:26 PM, Lester Caine wrote: > On 10/05/16 21:26, Levi Morrison wrote: > > It can affect the results. > > > > function foo(?Foo $param) {} > > > > If any code out there is calling foo with null then that code will now > > break if you remove the question mark. > > Car

Re: [PHP-DEV] [RFC] Pipe Operator

2016-05-12 Thread Quim Calpe
On Thu, May 12, 2016 at 12:33 PM, Davey Shafik wrote: > On Thu, May 12, 2016 at 1:19 AM, Larry Garfield > wrote: > > > On Mon, May 9, 2016, at 10:21 PM, Stanislav Malyshev wrote: > > > Hi! > > > > > > > |> seems like a common symbol to use, but it admittedly does look a > > > > > > So, usage in

Re: [PHP-DEV] function overloading

2016-11-16 Thread Quim Calpe
On Tue, Nov 15, 2016 at 10:33 PM, Alice Wonder wrote: > On 11/15/2016 08:13 AM, Dominic Grostate wrote: > >> I think this may have been discussed before, but I was largely dismissed >> because no one though it would be possible to implement. >> >> However assuming it is possible, what is the gene