Re: Stupid Newbie Question by merlyn- November 19, 2001 >>>>> "John" == John Rudd <jruddcats.ucsc.edu> writes:John> 1) Methods are always publicJohn> 2) Variables are always private (and in this case that means that otherJohn> instances may not view the instance variables of an object; I don&39;tJohn> recall whether the class can see the ivars of its instances but I&39;mJohn> pretty sure it can&39;t).No, an instance owns its ivars, so nobody touches it. However, theclass for an instance can define a new.http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg628.html Re: Stupid Newbie Question by Michael G Schwern- November 16, 2001 On Fri, Nov 16, 2001 at 07:26:37AM -0800, John Rudd wrote:> Smalltalk doesn&39;t give you any privacy options, but it does dictate a> certain degree of privacy. Smalltalk is big on "information hiding" as> part of the whole "OOP is an extension of Abstract Data Typing" concept.> > 1) Methods are always public> > 2) Variables are always private (and in this case that means that other> instances may not view the instance variables of an object; I...http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg627.html Re: Stupid Newbie Question by John Rudd- November 16, 2001 From: Michael G Schwern <schwernpobox.com>>On Thu, Nov 15, 2001 at 05:49:34PM -0800, John Rudd wrote:>> That way you could choose to impliment Smalltalk or C++ style>> protections (public, private, protected, etc)>>Last I checked Smalltalk had no privacy protection.>>> So, for Smalltalk type semantics, if $foo != $bar, the>> request will throw some sort of exeption indicating that $foo isn&39;t>> allowed to see $bar&39;s instance variables. But,..http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg626.html Re: Stupid Newbie Question by Michael G Schwern- November 15, 2001 On Thu, Nov 15, 2001 at 05:49:34PM -0800, John Rudd wrote:> So, for example, lets say I have an object $foo, which is an instance of> Class A. In one method, foo tries to access an instance variable of> $bar, an instance of Class B (not inherited from Class A).This is a naughty thing to do. $bar should have a set of accessormethods if you&39;re really worried. Read on.> If $bar&39;s instance variables are somehow hiddenLooks like the whole "an object is just a hash...http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg625.html Re: Stupid Newbie Question by John Rudd- November 15, 2001 Damian Conway wrote:> > Schwern explained:> > > Going away No way, it&39;s SPREADING! We might wind up with AUTOGLOB, too.> >> > http:dev.perl.orgrfc324.pod> > Though it won&39;t be called AUTOGLOB (globs are going away),> and its semantics might be closer to those portrayed in:> > http:www.yetanother.orgdamianPerl5+iautovivify.html> > DamianI&39;ve been turning these two items over in my head for the last few days,and wondering.http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg624.html Re: Stupid Newbie Question by Dan Sugalski- November 9, 2001 At 06:48 AM 1192001 +0000, Piers Cawley wrote:>Dan Sugalski <dansidhe.org> writes:>> > At 04:21 PM 1182001 -0800, John Rudd wrote:> >>So, does this mean my other heart&39;s desire of operator overloading might> >>be coming forth (I know, I know, here I am, a smalltalker, asking for> >>operator overloading ... but, what are the smalltalkers gonna do, take> >>away my membership card)> >> > What, you mean being able to override the.http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg623.html Re: Stupid Newbie Question by Piers Cawley- November 9, 2001 Dan Sugalski <dansidhe.org> writes:> At 04:21 PM 1182001 -0800, John Rudd wrote:>>So, does this mean my other heart&39;s desire of operator overloading might>>be coming forth (I know, I know, here I am, a smalltalker, asking for>>operator overloading ... but, what are the smalltalkers gonna do, take>>away my membership card)> > What, you mean being able to override the + function for a variable,> complete with method dispatch depending on the types of..http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg622.html Re: Stupid Newbie Question by Damian Conway- November 9, 2001 Schwern explained: > Going away No way, it&39;s SPREADING! We might wind up with AUTOGLOB, too. > > http:dev.perl.orgrfc324.podThough it won&39;t be called AUTOGLOB (globs are going away),and its semantics might be closer to those portrayed in: http:www.yetanother.orgdamianPerl5+iautovivify.htmlDamianhttp://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg621.html Re: Stupid Newbie Question by Michael G Schwern- November 8, 2001 On Thu, Nov 08, 2001 at 04:21:57PM -0800, John Rudd wrote:> So, does this mean my other heart&39;s desire of operator overloading might> be coming forthYeah, that was mentioned in Apoc and Exewhatever 3.-- Michael G. Schwern <schwernpobox.com> http:www.pobox.comschwernPerl6 Quality Assurance <perl-qaperl.org> Kwalitee Is Job OneWe&39;re talkin&39; to you, weaselnuts. http:www.goats.comarchive000831.htmlhttp://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg620.html Re: Stupid Newbie Question by Dan Sugalski- November 8, 2001 At 04:21 PM 1182001 -0800, John Rudd wrote:>So, does this mean my other heart&39;s desire of operator overloading might>be coming forth (I know, I know, here I am, a smalltalker, asking for>operator overloading ... but, what are the smalltalkers gonna do, take>away my membership card)What, you mean being able to override the + function for a variable, complete with method dispatch depending on the types of the variables on both sides of the +Yup.......http://www.nntp.perl.org/group/perl.perl6.language.objects/2001/11/msg619.html |