Hi!
> Interface is a good way to implement new functionality for classes, but
> operator overloading is language feature itself, so from my point of view,
> it will be better to put this functionality into the magic method.
No contradiction here. Language features can use interfaces, see
Throwabl
2016-01-05 2:04 GMT+03:00 Andrea Faulds :
> I agree that we could do something with interfaces. I would like to point
> out that we actually already have an example of this, in the form of the
> \ArrayAccess interface, which requires you to implement all the different
> indexing operations at once
On 01/04/2016 05:04 PM, Andrea Faulds wrote:
I agree that we could do something with interfaces. I would like to
point out that we actually already have an example of this, in the
form of the \ArrayAccess interface, which requires you to implement
all the different indexing operations at once.
Hi Stas,
Stanislav Malyshev wrote:
Hi!
constraint on function parameters and return types. I think it would be
more worth pursuing a Haskell-style approach in PHP, most likely with a
hierarchy of magic interfaces.
I agree that interface approach looks better than Python/C++ approach
for PHP.
Hi!
> constraint on function parameters and return types. I think it would be
> more worth pursuing a Haskell-style approach in PHP, most likely with a
> hierarchy of magic interfaces.
I agree that interface approach looks better than Python/C++ approach
for PHP. One thing it also allows is intro
Hi Rowan,
Rowan Collins wrote:
On 04/01/2016 16:34, Andrea Faulds wrote:
In Haskell, a purely-functional programming language, certain
operators (and also certain math functions like abs()) are defined as
part of "typeclasses", somewhat akin to interfaces in classical
object-oriented languages
On 04/01/2016 16:34, Andrea Faulds wrote:
In Haskell, a purely-functional programming language, certain
operators (and also certain math functions like abs()) are defined as
part of "typeclasses", somewhat akin to interfaces in classical
object-oriented languages like Java or PHP. These typecla