roxen.lists.pike.general

Subject Author Date
Re: [7.8.316] more Problems with Parser.XML.DOM (w/patch) Martin Bähr <mbaehr[at]email[dot]archlab[dot]tuwien[dot]ac> 13-08-2009
On Thu, Aug 13, 2009 at 10:21:51PM +0200, Reinhard Pfau wrote:
> Looking closer at these methods it looks like that the modifier
> "protected" was meant to work like in C++: it should allow indexing the
> method within another instance of the same class (hierarchy).

yes, but since pike normally compares objects by interface and not by
identity the only way to establish that an object is the same class by
identity is within the object itself, as a result it means that only a
subclass can access protected symbols in a parent class (within the same
object, but not across objects) otherwise it would mean that anyone
could circumvent a protected symbol by creating a compatible class

> But in Pike 7.8 "protected" is just an alias/a replacement for
> "static"...

which i believe was always the intention, to avoid confusion with the
different definition of static in other languages.

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer      working in china                   community.gotpike.org
foresight developer  foresightlinux.org                        open-steam.org
unix sysadmin        iaeste.(tuwien.ac|or).at                     caudium.org
Martin Bähr          http://www.iaeste.or.at/~mbaehr/            is.schon.org