Re: [RFC] Explicit call-site send-by-ref syntax

From: Date: Tue, 30 Jul 2019 01:05:53 +0000
Subject: Re: [RFC] Explicit call-site send-by-ref syntax
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-106332@lists.php.net to get a copy of this message
Hi! > I'm referring to the compiler and optimizer here. Especially in > namespaced code we pretty much always don't have a hard guarantee on > what function will get called. This means that we have to generate code > that dynamically dispatches between by-val passing and by-ref passing > (this is fairly cheap) and more importantly, has to dynamically dispatch > between read and write fetches across opcode chains (this is less OK, now I understand where this is coming from. While I appreciate the difficulty (though not sure how common is that - I mean, in about 99.9999% cases the natural guess about which function it is would be the global function, overriding global functions with namespaced ones is pretty rare), I am not sure introducing new language construct (or resurrecting old one which we decided to drop, at this point it's virtually the same) - yet more mandate its usage over the whole PHP codebase! - is the right way to solve an optimization problem in optimizer code. Optimization is nice, but it should not make things harder for the user. > I'm sorry Stas, but I will not be reading your mails in the future. I That's surely a great way to discuss making sweeping changes to the language. If you encounter disagreement - just stop reading mails and ignore whoever disagrees. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#106332) next »