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

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

Thread Previous | Thread Next
From:
Jason Switzer
Date:
June 2, 2010 11:59
Subject:
Re: r31043 -[S32/Containers] Buf does Stringy, too
Message ID:
AANLkTimzCB2h9jb8v2uAh2ydCNBkziih78D_d4MpTsYA@mail.gmail.com
On Wed, Jun 2, 2010 at 5:10 AM, <pugs-commits@feather.perl6.nl> wrote:

> Author: masak
> Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010)
> New Revision: 31043
>
> Modified:
>   docs/Perl6/Spec/S32-setting-library/Containers.pod
> Log:
> [S32/Containers] Buf does Stringy, too
>
> -    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 { ... }

The repetitive 'does' statements is about as annoying as how you have to
specify public/private inheritance scoping for each class in C++. Even Java
gets this right:

http://en.wikipedia.org/wiki/Interface_(Java)#Defining_an_interface

Just an idea.

-Jason "s1n" Switzer


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