roles
[gitmo/Moose.git] / TODO
1 -------------------------------------------------------------------------------
2 TODO
3 -------------------------------------------------------------------------------
4
5 - type unions
6
7 Add support for doing it with Classes which do not have 
8 a type constraint yet created
9
10 - type intersections
11
12 Mostly just for Roles
13
14 - inherited slot specs
15
16 'does' can be added to,.. but not changed
17 (need type unions for this)
18
19 - proxy attributes
20
21 a proxied attribute is an attribute
22 which looks like an attribute, 
23 talks like an attribute, smells 
24 like an attribute,.. but if you 
25 look behind the curtain,.. its 
26 over there.. in that other object
27
28 (... probably be a custom metaclass)
29
30 - compile time extends
31
32 [00:39]         sri         but maybe a better syntax for compile time extends
33 [00:39]         stevan  I have been pondering that actually
34 [00:39]         sri         use Moose extends => Foo::Bar
35 [00:40]         stevan  I think now that we have the Sub::Exporter stuff 
36                     in, that kinda thing should be pretty easy
37
38 nothingmuch notes that all the constructs should be supported in the entirety of the use clause:
39
40     use Moose (
41         has => foo (
42             ....
43         ),
44     );
45
46 and that if this usage style is used nothing is exported to the namespace.
47
48 - default should dclone()
49
50 - subtype $anon_subtype => where { ... }
51
52 [22:56]         stevan  sub mst_doesnt_like_to_type { (shift)->meta->attr->type_contstraint }
53 [22:57]         mst     err
54 [22:57]         stevan  :P
55 [22:57]         stevan  are you wanting to reuse it or something?
56 [22:57]         stevan  my $subtype = subtype 'Something' => where { ... };
57 [22:58]         stevan  then you can do isa => $subtype 
58 [22:58]         mst     but I can't subtype it again
59 [22:59]         stevan  mst: ahhh... 
60 [22:59]         mst     well, I can. but it suddenly gets very "long way round" ish
61 [23:00]         stevan  my $constraint = Moose::Meta::TypeConstraint->new(
62 [23:00]         stevan              name       => $name || '__ANON__',
63 [23:00]         stevan              parent     => $parent,            
64 [23:00]         stevan              constraint => $check,       
65 [23:00]         stevan              message    => $message,    
66 [23:00]         stevan          );
67 [23:00]         stevan  yeah thats kinda the long way
68 [23:00]         stevan  mst: what would you like it to be?
69 [23:00]         mst     $parent = find_type_constraint($parent) if defined $parent;
70 [23:00]         mst     if $parent is already a type constraint
71 [23:00]         mst     skip that bit
72 [23:00]         stevan  hmm
73 [23:00]         mst     should be all you need to change
74 [23:00]         stevan  yeah
75 [23:01]         stevan  so you can then say 
76 [23:01]         stevan  subtype $anon => where { ... };
77 [23:01]         mst     right
78 [23:01]         stevan  ok
79
80 - method keyword
81
82 [23:37]         mst     more seriously, I'd still like a "method" keyword or something
83 [23:37]         mst     method 'foo' => sub { ... };
84 [23:38]         stevan  what would it do more than sub foo { ... }?
85 [23:39]         stevan  I would like multimethods actually
86 [23:39]         mst     almost exactly nothing, to begin with
87 [23:39]         stevan  but thats just cause I love CLOS and am reading a book on Dylan now
88 [23:40]         stevan  keyword squating :)
89 [23:40]         mst     but if we need to hook stuff later it's bloody handy to already have people writing it that way
90 [23:40]         mst     right
91 ...
92 [23:49]         mst     oh, also: method 'has' => sub { ... } could squelch the redefine warning
93  
94 -------------------------------------------------------------------------------
95 TO PONDER
96 -------------------------------------------------------------------------------
97
98 - Moose "strict" mode
99
100 use Moose 'strict'; This would allow us to have all sort of expensive tests
101 which can be turned off in prod.     
102         
103 - Moose::Philosophy.pod
104
105 To explain Moose from a very high level
106
107 - moosedoc
108
109 We certainly have enough meta-information to make pretty complete POD docs.
110         
111         
112