On Tue, Jul 17, 2018 at 3:39 PM Dan Ackroyd wrote:
> On 17 July 2018 at 13:08, Zeljko Mitic wrote:
> >
> > It won't help, preprocess.io doesn't remove typehints.
>
> It doesn't _currently_ remove parameter types.
>
> If you think this is an idea worth doing, you could write the
> functionality
On 17 July 2018 at 13:08, Zeljko Mitic wrote:
>
> It won't help, preprocess.io doesn't remove typehints.
It doesn't _currently_ remove parameter types.
If you think this is an idea worth doing, you could write the
functionality to do that.
cheers
Dan
--
PHP Internals - PHP Runtime
On Tue, Jul 17, 2018 at 1:18 PM Dan Ackroyd wrote:
> On 15 July 2018 at 20:39, Zeljko Mitic wrote:
> > PHP is dynamic language and each typed typehinted parameter has to be
> > checked every time.
>
> If you think your code would benefit appreciably from having parameter
> types removed, I
On 15 July 2018 at 20:39, Zeljko Mitic wrote:
> PHP is dynamic language and each typed typehinted parameter has to be
> checked every time.
If you think your code would benefit appreciably from having parameter
types removed, I would strongly recommend looking at
https://preprocess.io/ and
On 16 July 2018 at 19:17, Larry Garfield wrote:
> It sounds like your main argument for why to even bother with this is
> performance. I think you're greatly over-estimating the performance
> impact of
> type checking. I wager if you just cache a few database lookups and
> you'll
> get a much
On Monday, July 16, 2018 12:23:42 PM CDT Zeljko Mitic wrote:
> On Mon, Jul 16, 2018 at 1:42 PM Rowan Collins
>
> wrote:
> > On 16 July 2018 at 12:06, Arvids Godjuks wrote:
> >> Basically, you went wrong when you proposed a switch that controlls
> >> language behavior. To add to that - a switch
On Mon, Jul 16, 2018 at 1:42 PM Rowan Collins
wrote:
> On 16 July 2018 at 12:06, Arvids Godjuks wrote:
>
>> Basically, you went wrong when you proposed a switch that controlls
>> language behavior. To add to that - a switch that probably is not
>> controllable by code that is running.
>>
>
>
>
On 16.07.2018 at 13:15, Yasuo Ohgaki wrote:
> What you need is DbC.
> It's more flexible and complete. It satisfies all of your needs and more.
> An issue is that DbC is not static code analysis tool friendly.
>
> https://wiki.php.net/rfc/introduce_design_by_contract
>
On Mon, Jul 16, 2018 at 1:44 PM Zeljko Mitic wrote:
>
>
> On Mon, Jul 16, 2018 at 1:14 PM Nikita Popov wrote:
>
>> On Sun, Jul 15, 2018 at 9:39 PM, Zeljko Mitic wrote:
>>
>>> PHP is dynamic language and each typed typehinted parameter has to be
>>> checked every time. I am suggesting new
On 16/07/18 12:14, Zeljko Mitic wrote:
But please, do keep in mind that I would like to have this feature as
optional.
The problem with most of these 'improvements' to PHP is that the case is
always made that 'you do not have to use it' and this is yet another
load on the code base that 'you
On Mon, Jul 16, 2018 at 1:14 PM Nikita Popov wrote:
> On Sun, Jul 15, 2018 at 9:39 PM, Zeljko Mitic wrote:
>
>> PHP is dynamic language and each typed typehinted parameter has to be
>> checked every time. I am suggesting new php.ini value "typecheck.enable =
>> 1" which can be turned off.
>>
>>
On 16 July 2018 at 12:06, Arvids Godjuks wrote:
> Basically, you went wrong when you proposed a switch that controlls
> language behavior. To add to that - a switch that probably is not
> controllable by code that is running.
>
While I agree with your general principle here, I would like to
пн, 16 июл. 2018 г. в 14:14, Zeljko Mitic :
>
>
> On Mon, Jul 16, 2018 at 1:06 PM Arvids Godjuks
> wrote:
>
>> пн, 16 июл. 2018 г. в 13:56, Zeljko Mitic :
>>
>>> I tried to, but I honestly can't see the problem. No decent programmer
>>> makes error by sending wrong type of parameter and this
On Mon, Jul 16, 2018 at 4:46 AM Zeljko Mitic wrote:
> PHP is dynamic language and each typed typehinted parameter has to be
> checked every time. I am suggesting new php.ini value "typecheck.enable =
> 1" which can be turned off.
>
> Example:
> with default php config, a code like this would
On Mon, Jul 16, 2018 at 1:06 PM Arvids Godjuks
wrote:
> пн, 16 июл. 2018 г. в 13:56, Zeljko Mitic :
>
>> I tried to, but I honestly can't see the problem. No decent programmer
>> makes error by sending wrong type of parameter and this feature is 100%
>> optional. I know for sure that even in my
On Sun, Jul 15, 2018 at 9:39 PM, Zeljko Mitic wrote:
> PHP is dynamic language and each typed typehinted parameter has to be
> checked every time. I am suggesting new php.ini value "typecheck.enable =
> 1" which can be turned off.
>
> Example:
> with default php config, a code like this would
пн, 16 июл. 2018 г. в 13:56, Zeljko Mitic :
> I tried to, but I honestly can't see the problem. No decent programmer
> makes error by sending wrong type of parameter and this feature is 100%
> optional. I know for sure that even in my dev computer, I would use this
> feature, and probably most
On Mon, Jul 16, 2018 at 12:56 PM Zeljko Mitic wrote:
> I tried to, but I honestly can't see the problem. No decent programmer
> makes error by sending wrong type of parameter and this feature is 100%
> optional. I know for sure that even in my dev computer, I would use this
> feature, and
I tried to, but I honestly can't see the problem. No decent programmer
makes error by sending wrong type of parameter and this feature is 100%
optional. I know for sure that even in my dev computer, I would use this
feature, and probably most programmers aware of the issue.
Maybe simpler example:
On Sun, Jul 15, 2018, 22:45 Zeljko Mitic wrote:
> PHP is dynamic language and each typed typehinted parameter has to be
> checked every time. I am suggesting new php.ini value "typecheck.enable =
> 1" which can be turned off.
>
> Example:
> with default php config, a code like this would check
PHP is dynamic language and each typed typehinted parameter has to be
checked every time. I am suggesting new php.ini value "typecheck.enable =
1" which can be turned off.
Example:
with default php config, a code like this would check each member of $users
array:
function demo(User ...$users) {}
21 matches
Mail list logo