From 8c435c2b0dc85af236c026e97be3bcc4e31ba395 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Wed, 9 Nov 2011 12:50:14 +0000 Subject: notes for the future --- attr.pl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/attr.pl b/attr.pl index 18ea6b0..de90bd8 100644 --- a/attr.pl +++ b/attr.pl @@ -330,3 +330,34 @@ say $obj->stuff_timed({}); say $obj->stuff_timed({when=>12}); } + +=pod + +=head1 NOTES + +we could override C, C and +C<$meta_instance->set_slot_value> (or C) on the +L<::Meta::Attribute>. + +that would take care of type constraints, while leaving us free to use +an arbitrary internal representation. + +no inlining, it's too awkward + +=head2 internal representation + +not easy… we need something like L, but slightly less +insane, with added tagging (we can't sensibly decouple intervals from +tags/envs, the representations would clash) + +suggestion: per each tag: + +arrayref, position 0 = default (-inf,inf) + +other elements set in asc order of start + +binary search (on start, with additional check on end) to find the +right place to read from + +split / remove elements when setting / clearing + -- cgit v1.2.3