summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+