develooper Front page | perl.perl5.porters | Postings from March 2011

Re: Revising Perl's OO docs - a new OO tutorial

Thread Previous | Thread Next
From:
Chris Prather
Date:
March 7, 2011 16:34
Subject:
Re: Revising Perl's OO docs - a new OO tutorial
Message ID:
AANLkTimeTj6NNcrmZenKC4iBhn=YV84QHYyUFENLNRQ6@mail.gmail.com
On Mon, Mar 7, 2011 at 6:56 PM, Jan Dubois <jand@activestate.com> wrote:
> On Mon, 07 Mar 2011, Chris Prather wrote:
>>
>> In my opinion you're moving from dangerous to useless at best. I feel
>> that the *semantics* of this syntax are confusing. They confuse method
>> dispatch with assignment*.
>
> I disagree.

Fine. Let's agree to disagree.

Yes there are lots of other languages that have different default.
It's yet another reason why I feel uncomfortable using them. Perl has
over a decade of using standard method dispatching for accessors for
what are largely technical reasons. It doesn't change the fact that my
opinion is what it is, and I felt it should be stated in this thread
because it's caused *me* psychological confusion in the past when
moving between Perl, Javascript, Java and more esoteric languages.

>> Suggesting that encapsulation is a bad thing, or even an undesirable
>> thing is the "horrible idea". Especially for the beginners that the
>> advantages of a $obj->attr = $x syntax would primarily benefit.
>
> Nobody suggested that encapsulation is a bad thing, so I call strawman here.

I was trying to clarify what I felt was a misunderstanding Ric had
about my initial objections which were centered around a perception or
opinion of *mine* that this syntax leads to violation of
encapsulation.

-Chris

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About