Hi internals,
> I have a working implementation for calling global functions in constant
> expressions
> at https://github.com/php/php-src/pull/5139
> (see PR description for more details, see tests for how edge cases get
> resolved)
I've written up an early draft of this based on
https://wi
> As you've already realized, the main problem here is the behavior for
> functions that have side-effects or state. Currently we mostly get away
> with the illusion that it doesn't matter when exactly constexpr
> initializers are evaluated. Apart from the error location and (admittedly
> quite a f
On 06/02/2020 20:06, Andrea Faulds wrote:
Haskell has a nice approach (probably some other languages have this
too) where it has typeclasses that contain related operators, which
means that e.g. if you want to overload +, your type needs to support
Num which also contains -, *, abs, the sign fu