[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] Feature Proposal: Allow letter decrementing
From:       Yasuo Ohgaki <yohgaki () ohgaki ! net>
Date:       2013-07-19 20:45:23
Message-ID: CAGa2bXat-adyRYXS0BUDa7Ofy=6dm1wd2vmbygVy_DJs=HaCWQ () mail ! gmail ! com
[Download RAW message or body]


Hi Nikita,

2013/7/19 Nikita Popov <nikita.ppv@gmail.com>

> I don't think we should add string decrementing due to the rather complex
> logic behind it (imho the string incrementing that we have shouldn't be
> there either).
>

Right. It is impossible to symmetric operation ++/-- for strings.
Not implementing --'STRING' is a valid option.


> What we *should* add though is a notice or warning in case
> an increment/decrement operation fails. incdec is one of the few places
> where we currently silently ignore FAILUREs, instead of throwing some
> helpful error message :)
>

Making --'STRING'  raises E_NOTICE is reasonable option.
If PHP don't support, then it would better to notice users.
It may be useful to spot bugs, too. Raising error might be more
helpful for many users.

I don't have concrete idea for --'STRING'. E_NOTICE might be the
way to go.

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic