root/misc/Perl-MetaModel/README

Revision 6779, 3.0 kB (checked in by Darren_Duncan, 3 years ago)

/modules/* : detabbed 2 more Date files and 1 more Perl-MetaModel? file

  • Property svn:mime-type set to text/plain; charset=UTF-8
  • Property svn:eol-style set to native
Line 
1---------------------------------------------------------------------
2 Perl 6 Object Meta Model
3---------------------------------------------------------------------
4
5This is a first sketch/prototype of the Perl 6 Object Meta Model. It
6is very much a work in progress, and any thoughts/ideas/suggestions
7are very much welcome.
8
9Currently the people involved in this are:
10
11    Stevan "stevan" Little & Sam "mugwump" Vilian
12
13Contact them on #perl6 for more details.
14
15The many levels of introspection
16~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17There are several "layers" to the Perl 6 object system.  Overview
18information can be found in:
19
20    docs/meta_meta_classes.pod
21
22off the Pugs root there is some more information:
23    docs/class/*
24    src/Pugs/Class.hs
25
26Each level is currently being developed in parallel, as
27
28M1 - Class level - the language Model
29~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30The Perl 6 "clean" prototypes of Perl 6 core language entities, for
31example the "Class" class defined as a class, can be found in;
32
33    lib/*
34
35These entities should be derived primarily from features required by
36things in the Synopses.  In particular, most of S29 should end up
37defined as methods on classes in this directory.
38
39Currently in Pugs, the closest corresponding entities are;
40
41  - Compiled Types:
42      - MkType inserting to envClasses in Pugs/AST/Internals.hs
43
44  - "Core" types, including "Classes":
45      - Type in Pugs/Types.hs (as a base class)
46
47      - VStr, VBool, VInt, VRat, VNum, VComplex, VHandle, VSocket,
48        VThread, MatchPGE in Pugs/Types.hs
49
50      - VRef, VOpaque, VControl, VScalar, VPair, VList, VSubst,
51        VArray, VHash, VThunk, VProcess, VMatch, VCode, VJunc,
52        VObject, VType in Pugs/AST/Internals.hs
53
54Classes that are what you would get out of introspecting the Haskell
55source at:
56
57    lib/Pugs/*.pm
58
59Attribute names should be taken from the Haskell source where
60possible.  Note that there are several Haskell constructs that are
61hazy areas about how the same thing is written in Perl 6; Haskell is
62an advanced language!
63
64M2 - Meta::Class level - the langauge Meta-Model
65~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66These objects represent data structures capable of describing the M1
67classes, and changes that are permitted to the M1 objects, such as
68defining new Class traits.  These are being built in:
69
70    lib/Meta/*.pm
71
72M3 - Meta::Meta::Class - the language Meta-Meta-Model
73~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74These are designed to be a minimal set of classes that can describe
75any Meta::Model.
76
77If we follow the same path that SmallTalk72 did when they found the M3
78was unnecessary, then perhaps the M3 will be unnecessary.
79
80For now, the M3 is based on the core Class support in Pugs, and the
81module;
82
83    lib/Meta/Util.pm
84
85This module generates accessors which support the Class::Tangram
86collection message passing convention, which allows references and
87collection properties of objects to "track" each other; see the last
88few tests in t/01-util.t for an example of how this works.
Note: See TracBrowser for help on using the browser.