Re: Providing features through the storage class
John Cowan 19 Sep 2015 22:38 UTC
Bradley Lucier scripsit:
> Do you expect the table to be fully populated? If so, a generic storage
> class would be better.
No, I would think that the whole point of sparse arrays is that most elements
aren't set.
> Or do you expect a default value returned from the getter when asked for
> previously unset values?
I'd expect there to be a default, in the sense that it would not be an error
to try to access a value that hasn't been set.
It would be good, but not I think necessary, to be able to say what that
value is on a per-array basis.
--
John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org
If a soldier is asked why he kills people who have done him no harm, or a
terrorist why he kills innocent people with his bombs, they can always
reply that war has been declared, and there are no innocent people in an
enemy country in wartime. The answer is psychotic, but it is the answer
that humanity has given to every act of aggression in history. --Northrop Frye