summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianni Ceccarelli <dakkar@thenautilus.net>2011-11-09 12:50:14 +0000
committerGianni Ceccarelli <dakkar@thenautilus.net>2011-11-09 12:50:27 +0000
commit8c435c2b0dc85af236c026e97be3bcc4e31ba395 (patch)
treedcc0049115ed9788b81166824d84ffdb05bbe2d7
parenttest type constraint (diff)
downloaddata-multivalued-8c435c2b0dc85af236c026e97be3bcc4e31ba395.tar.gz
data-multivalued-8c435c2b0dc85af236c026e97be3bcc4e31ba395.tar.bz2
data-multivalued-8c435c2b0dc85af236c026e97be3bcc4e31ba395.zip
notes for the future
-rw-r--r--attr.pl31
1 files changed, 31 insertions, 0 deletions
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<set_raw_value>, C<get_raw_value> and
+C<$meta_instance->set_slot_value> (or C<set_initial_value>) 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<Array::IntSpan>, 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
+