roxen.lists.pike.general

Subject Author Date
答复: 答复: Bug when using program a 郭雪松zZ x <郭雪松zZ x[at]nirgend> 10-10-2009
 =?utf-8?Q?s_key_of_mapping?=
'private' not.

class A {
  int t;
  private class C1 {
	  void create()
	  {
		  t=1; //it's ok
	  }
  }
  hide_parent class C2 {
	  void create()
	  {
		  t=1; //throw a error
	  }
  }
}


-----邮件原件-----
发件人: Martin Bähr [mailto:<mbaehr[at]email.archlab.tuwien.ac.at>] 
发送时间: 2009年10月10日 14:13
收件人: 郭雪松
抄送: <pike[at]roxen.com>; <mast[at]lysator.liu.se>
主题: Re: 答复: Bug when using program as key of mapping

On Sat, Oct 10, 2009 at 12:43:16PM +0800, 郭雪松 wrote:
> How about adding a keyword ' hide_parent' to forbid a class or function access
vars in parent? 
> If B or C reference any var in A, throw a error.

doesn't private do exactly that?

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
searching contract jobs:  programming, training and administration - anywhere
--
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