Hello again,

Chip pointed out to me that my post was severely mangaled because it was too wide, so I have reformatted to fit within 70 columns, hope this works better.

NOTE: I realize that this format may be entirely inappropriate for this too. The type "hierarchy" is likely to be more graph-ish especially when we start to introduce Roles as well as Classes into the mix. But this is a starting point at least.

Thanks,

Stevan

---------------------------------------------------------------------
Any                   :     : The "top" type
---------------------------------------------------------------------
  Bit                 :     : Basic Bit type
    Bool              :     : Boolean type (probably built on Bit)
---------------------------------------------------------------------
  Num                 :     : Base Numeric type
    Int               :     :
    Float             :     :
    Complex           :     :
---------------------------------------------------------------------
  Byte                : S29 : straddles Numeric and Character types
  Char                : S29 : Base Character type
    LanguageChar      : S29 :
    Grapheme          : S29 :
    CodePoint         : S29 :
---------------------------------------------------------------------
  Str                 :     :
---------------------------------------------------------------------
  Ref                 :     :
  Array               :     :
  Hash                :     :
  Pair                :     :
  Range               :     :
    StrRange          :     :
    NumRange          :     :
  Proxy               :     :
---------------------------------------------------------------------
  IO                  :     :
---------------------------------------------------------------------
  Code                :     : Base for all executable objects
    Block             :     : Base for all embedded executable object
    Routine           :     : Base for all nameable executable object
      Sub             :     :
        Macro         :     :
        Method        :     :
          Submethod   :     :
        MultiSub      :     :
          Multimethod :     :
        Lvalue        : S06 :
---------------------------------------------------------------------
  Grammar             : S05 : likely derived from Module
  Rule                : S05 : likely derived from Method
  Token               : S05 :
---------------------------------------------------------------------
  Object              :     :
    Package           :     :
      Module          :     :
        Class         :     :
        Role          :     :
---------------------------------------------------------------------
  List                :     : Lazy Perl list
    ParamList         :     :
  Named               : S06 : A named param (derived from Pair)
  Tuple               :     : Completely evaluated (immutable) list
---------------------------------------------------------------------


On Jan 3, 2006, at 6:15 PM, Stevan Little wrote:

Hello all,

I hope everyone is having a good start to the new year.

As Audrey's posts have mentioned, we are starting to work on container and boxed types in the PIL^N/PIL2 runcore. Over the holidays I went through the most recent Synopsis and attempted to compile a list of what I think are the core Perl 6 "types" based on what was mentioned in the various Synopsis.

I say "types" because I want not to get into a discussion on type theory/lattices/etc. or anything of the sort right now. I want only to try to grok the hierarchy of types so that I can begin to build the container and boxed types in PIL^N.

Now the closest thing to a full list I found was in S06, but it seemed to leave out some things mentioned in the other (possibly out of date) Synopsis, so I built the table below.

In addition to just listing them, I also attempted to (loosly) structure them into a hierarchy to illustrate the (sub|super)-type relationships. The table is split into 3 columns, the first the type (tab depth determining place in the heirarchy), the second is the Synopsis it was mentioned in (a blank value in this column means it was in the S06 list), and lastly a description of the type (if it's meaning not obvious that is).

I am sure I am probably missing a few, have mistakenly put others in the wrong place in the heirarchy, and/or I may even be completely and totally in the wrong in every way. But I figured it was a start, and I would see what others had to say.

Thanks,

Stevan

---------------------------------------------------------------------- ---------
Any                             :     : The "top" type
---------------------------------------------------------------------- ---------
    Bit                         :     : Basic Bit type
Bool : : Boolean type (probably built on Bit) ---------------------------------------------------------------------- ---------
    Num                         :     : Base Numeric type
        Int                     :     :
        Float                   :     :
        Complex                 :     :
---------------------------------------------------------------------- --------- Byte : S29 : straddles Numeric and Character types
    Char                        : S29 : Base Character type
        LanguageChar            : S29 :
        Grapheme                : S29 :
        CodePoint               : S29 :
---------------------------------------------------------------------- ---------
    Str                         :     :
---------------------------------------------------------------------- ---------
    Ref                         :     :
    Array                       :     :
    Hash                        :     :
    Pair                        :     :
    Range                       :     :
          StrRange              :     :
          NumRange              :     :
    Proxy                       :     :
---------------------------------------------------------------------- ---------
    IO                          :     :
---------------------------------------------------------------------- --------- Code : : Base for all executable objects Block : : Base for all embedded executable object Routine : : Base for all nameable executable object
            Sub                 :     :
                Macro           :     :
                Method          :     :
                    Submethod   :     :
                MultiSub        :     :
                    Multimethod :     :
                Lvalue          : S06 :
---------------------------------------------------------------------- ---------
    Grammar                     : S05 : likely derived from Module
    Rule                        : S05 : likely derived from Method
    Token                       : S05 :
---------------------------------------------------------------------- ---------
    Object                      :     :
        Package                 :     :
            Module              :     :
                Class           :     :
                Role            :     :
---------------------------------------------------------------------- ---------
    List                        :     : Lazy Perl list
        ParamList               :     :
Named : S06 : A named param (derived from Pair) Tuple : : Completely evaluated (immutable) list ---------------------------------------------------------------------- ---------




Reply via email to