Damnit, google turned off my Reply to All

---------- Forwarded message ----------
From: Chris Prather <perig...@gmail.com>
Date: Thu, Jul 2, 2009 at 3:18 PM
Subject: Re: AttributeHelpers naming (again)
To: Stevan Little <stevan.lit...@iinteractive.com>


On Thu, Jul 2, 2009 at 2:53 PM, Stevan
Little<stevan.lit...@iinteractive.com> wrote:
> I think we have 3 categories of things, at least in my mind ...
>
> 1) Low-level immutable data structures:
>
>  ImmutableHash
>  List
>
> These have no mutation operations available and are building blocks for the
> other mutable versions (see below). I doubt people actually use these ones
> directly (at least not often).
>
> 2) Basic data-structures and values:
>
>  Array
>  Hash
>  Bool
>  String
>  Number
>  Bag
>
> Array is an "extension" of List and Hash is an "extension" of ImmutableHash,
> both providing additional mutation operations. Bool, String and Number are
> just your basic values. Bag is just a poorly named and badly implemented
> data structure. Now, these do not really map to the Perl Scalar, Array, Hash
> types. However some of them do map to some of the basic Moose types (Bag
> being the exception).
>
> 3) Code Patterns
>
>  Counter
>
> We only have one of these, but I can see other patterns like some kind of
> StringBuffer maybe (sure you could do that with String, but this would
> provide sensible defaults). The key thing about these is that they provide
> sensible types, default values and a subset of operations. They have a
> clarity of purpose which makes them more self documenting and therefor very
> useful.
>
> ---
>
> So, not sure this really helps. I wouldn't mind splitting these things into
> 3 different categories or something. I mean, we are breaking back compat
> with MX::AH so we are free to rethink this if we want.
>

The only thing that really ties these together is that they're
unblessed attribute types, otherwise I think stevan's breakdowns here
are exactly it. Breaking them apart into useful abstractions and
possibly adding things like Queue, and Stack to the Code Patterns set
(which would make Array a List + Stack + Queue) would be possibly the
right idea.

-Chris

Reply via email to