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

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

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

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

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

Re: [PHP-DEV] Silent Types

2019-09-04 Thread Michał Brzuchalski
śr., 4 wrz 2019, 05:52 użytkownik Fwentish Aelondes napisał: > Hello internals, > > Zeev's idea to bring peace to the galaxy seems like a good idea, but > impossible to implement in practice. > > But it got me thinking about how one might introduce static typing > into a dynamically typed