Re: Pseudo-objects (methods on arrays, strings, etc.)

From: Date: Tue, 17 Jul 2012 20:30:16 +0000
Subject: Re: Pseudo-objects (methods on arrays, strings, etc.)
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

> Having pure object would be not efficient enough and brings its lot of
> caveats. Also it is important to keep in mind that this idea does not
> apply only to array but to other types as well.

Same for other types. Just adding -> doesn't make the code
object-oriented. And just bolting -> on top of regular function calls
because it looks prettier seems meaningless to me. OK, we could make
$foo->bar() mean bar($foo) - python already has pretty much the same
idea, after all - but what's the point in it? I don't see any that would
be worth the effort.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227


Thread (66 messages)

« previous php.internals (#61380) next »