develooper Front page | perl.perl6.language | Postings from June 2010

Re: r31043 -[S32/Containers] Buf does Stringy, too

Thread Previous
From:
Aaron Sherman
Date:
June 2, 2010 14:09
Subject:
Re: r31043 -[S32/Containers] Buf does Stringy, too
Message ID:
AANLkTinJlyhs9ZZQBZ21Di0hhwJ8aCMpg1Xwrvy9KL_O@mail.gmail.com
On Wed, Jun 2, 2010 at 2:59 PM, Jason Switzer <jswitzer@gmail.com> wrote:

> On Wed, Jun 2, 2010 at 5:10 AM, <pugs-commits@feather.perl6.nl> wrote:
>
> >
> > -    class Buf does Positional {...}
> > +    class Buf does Positional does Stringy {...}
> >
>
> I never really thought about this, but now that I see it here, it made me
> realize that how 'does' works seems verbose. I think we should be able to
> specify a list instead of a bunch of 'does' statements. For example, the
> above example should be written as
>
> class Buf does Positional, Stringy { ... }
>
>
Pro:
* Shorter can be good
* It's pretty clear what's going on.

Con:
* Composition is complicated. Explicit "does foo" calls that out
* Something like:

  class Buf
    does Positional
    does Stringy
  { ... }

... looks to me like a laundry list of what I need to be aware of when
considering this class's uses, brace style preferences notwithstanding.

My knee-jerk response would be that this is fine the way it is now, but
perhaps adding your suggestion as an alternative syntax could be considered
for >6.0?

Then again, no one cares what I say ;-)


-- 
Aaron Sherman
Email or GTalk: ajs@ajs.com
http://www.ajs.com/~ajs


Thread Previous


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