I've given this quite a bit of thought and what I'm talking about here is what I've concluded would be the most likely to pass the RFC process. There absolutely are some things that are less than ideal about it, but they are working within the constraints of reality. I'm obviously open to suggestions and I don't plan on trying to do this myself anyway, at least not in the near future. I'd be involved but I don't have the time to lead it.
If you think about it, there's not really any difference between a delegate type and its implementor vs an interface member and its implementor, in terms of the the rules that they should follow with typing and naming of params
@DaveRandom :36781633 If you had to implement this natively, would you refactor the implementation of interface member declarations in order to have it use native typed functions?
@TomasZubiri Oh I see. I don't know what the implementation is like, but yes it seems to me that any validation of inherited function signatures should use as much shared logic as possible
@kelunik Continually re-throwing into the generator is a weird behavior whose only purpose is to ensure a throwing finally block doesn't throw at a random time, which only applies when the coroutine is failed with InvalidYieldError.
It's a weird edge case that is only because of a coding error anyway.
phpdbg -qrr vendor/bin/phpunit --coverage-text --process-isolation --debug
PHPUnit 6.1.1 by Sebastian Bergmann and contributors.
[PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 559416998969376 bytes) in /home/kelunik/GitHub/amphp/amp/vendor/phpunit/phpunit/src/Util/GlobalState.php on line 166]
@kelunik The way dispose was written it just kept re-throwing the exception into the generator, so further promises were not handled in the same way. I'd be for just throwing InvalidYieldError into the generator and continuing normal coroutine execution if it caught it.
how shopping websites prevent tampering of purchase transaction by editing the given value of price? Like if i'm purchasing something of $50 but during the transit i changed 50 to $5. How server verifies that value?
the fact that i can't see where a method comes (if it comes from a trait and which) from using reflection made me start the eleventh rewrite @pmmaga but i'm optimistic, i've tried almost every single combination
We should really bench some of these drivers. I think libuv might be faster, but I wonder if the overhead in the userland code might make libev superior.