Implemented %% integer division operator#724
Conversation
|
Huge -1 on this, |
|
It's one of the few sane syntax choices IMO, I'd prefer that over |
|
Although it has no potential for name clashes, I agree that with |
|
Sure, but I can't think of a better choice. :/ |
|
I don't like %% too much either. Also, what about gmp? I don't see this patch updating gmp to support the new operator. |
|
Also, tokenizer tests are unhappy. |
|
On 16 Jul 2014, at 18:36, Stanislav Malyshev notifications@github.com wrote:
Somehow I managed to think of doing it for my bigints patch but not for the gmp extension, I’ll do that, my bad. Andrea Faulds |
|
@smalyshev I'm unable to reproduce the tokeniser issue on my machine. |
|
@TazeTSchnitzel still not the reason to break CI :) |
|
Sure... I'll try and figure out what's up. |
|
@smalyshev Fixed it. It "didn't happen on my machine" because I compiled with |
|
@datibbaw I'd argue it does make some sort of sense, it's just rather backwards: |
|
If only we didn't use \ for namespaces, we could use it here like some other languages do... |
|
Yeah, Visual Basic does that and it's a good choice. |
|
No, \ is already used in namespaces, we can not use it without creating an ambiguity. |
|
Right, but would the double-backslash work? Can you have a blank namespace? |
|
You can not use \ for namespace, but I don't think it is a good idea to reuse namespace syntax for completely unrelated operator. |
|
Yeah, that's the problem. |
|
I don't like this %%. ........... -1 |
|
RFC was rejected, so this request is closed. |
https://wiki.php.net/rfc/intdiv
There's also a pull request that just adds a function to
ext/standardinstead, in case I can't get the operator in: #722