develooper Front page | perl.perl6.language | Postings from August 2005

TSa's Perl 6 type lattice version 1.0

From:
TSa
Date:
August 4, 2005 09:06
Subject:
TSa's Perl 6 type lattice version 1.0
HaloO,

in case someone might be interested, here is my more or less complete
idea of the Perl 6 type lattice as ASCII art.

Enjoy. Comments welcome.


                                 ::Any
...............                    |     ...........................
        _______:___________________/|\____:_________                :
       |       :                    |     :  |      |   static type :
    Package    :                    |     : Void  ?Bool   = context :
       |       :                    | ____:__|______|               :
     Module    :                    |/    :.........................:
    ___|___    :                    |
   |       |   :                    |
Class Grammar :                    |
   |_______|   :                    |
       |       :                    |
      Role     :                 Object     Record =::= Frame =::= Dictionary
               :                    |
               :         __________/ \_____________________________________
   with        :        |                  |        |     |        |       |
   invocant(s) :      &Code              $Item    %Hash Frame    @Array Tuple
               :        |                  |        |_____|________|_______|
   block owner : topic  |                  |                               |
            $/ : $_     |                  |                               |
           ____:_______/ \_____         ___|________________________       |
          |    :  |    \       |       |        |      |     |      |      |
       .Method : Sub    \  ->Block   \Ref     Value  Undef  Inf  Junction  |
         /|    :  |\     \             |        |                          |
        / |    :  | \     \  __________|        |_____________________     |
     Rule |    :  | Macro  \/          |        |       |       |     |    |
          |____:_/|        Ref[Code]   |      :Pair  /Match/  ~Str  +Num   |
          |    :  |                    |        |               |     |    |
        Multi  :  |                    |        |               |    Int   |
..............:  |                    |        |               |   / |    |
                  |                    |___  ___|               Enum  |    |
                  |                    |   \/                     |   |    |
                  |                    |  Entry[::T.does(Hash)]  Bit  |    |
             _____|__                  |___  _________________________|    |
            |        |                 |   \/                              |
        =Iterator  *List               |  Pos[::T.does(Str|Array)]         |
                     |                 |                                   |
     ________________|_________   _____|___________________________________|
    |      |     |        |    \ /                                         |
..Range  Pipe  Lazy  **Eager  Ref[Array|Hash]                             |
    |______|_____|________|________   _____________________________________|
                                   \ /
                                (to | all leafes)
                                   \|/
                                 ::All
-- 
$TSa.greeting := "HaloO"; # mind the echo!



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About