Hi Andrea,

On Thu, Jul 17, 2014 at 8:44 AM, Andrea Faulds <a...@ajf.me> wrote:
>
> On 17 Jul 2014, at 07:29, Zeev Suraski <z...@zend.com> wrote:
>
>> From debating whether it's worth it to add a new function for an
>> not-so-commonly-used-operation-to-say-the-least, we're now seriously
>> considering adding a new language level operator?  Really?
>
> Is it *really* not that common? I can think of several use-cases off the top 
> of my head:
>
> * Time (actually pretty common in web apps, though we have a DateTime class)
> * Splitting into rows and columns
> * Pagination
> * Currency (you can’t, for example, represent the full number of BTC in 
> circulation in BTC's base unit without using an integer of beyond 53-bits, 
> and it’s common practise to use *fixed-point* arithmetic here)
> * Nearest-neighbour scaling
> * Most likely other ones (these are just what I thought of immediately)
>
> Also, while ** is great for some applications, it’s not going to be used much 
> by others. Is the same not true of an integer division operator?


The rare cases where I had to do that, I relied on bcmath or gmp. Yes,
I needed some extra ops to actually achieve what this RFC proposes but
it is good enough. The new ops overloading for extension simplifies
that a lot as well.

I am sorry but I'd to say -1 on this addition, not worse a new
operator or function for this.


Cheers,
-- 
Pierre

@pierrejoye | http://www.libgd.org

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to