Jon Lang wrote:

Keys, OTOH, don't have any such requirement; so continuous keys may
very well be doable.  If they _are_ doable, you have to ask questions
such as "how do I assign values to a continuous interval of keys?"  To
truly be robust, we ought also answer this question in terms of
multidimensional keys, which can be a nightmare.

At some point we need to accept that all forms of containers are just syntax for special functions. At some point it you get diminishing returns for hiding this. We could handle continuous ranges using closures and pointy-blocks:

%x.insert: -> $x, $y where {$x**2 + $y**2 <= 1} { sqrt($x**2 + $y**2) }

%x.delete may be somewhat more tricky, unless it's implemented as just a special form of insertion (of "undef" values).

Getting good performance from such a container might be difficult.

Reply via email to