Email list hosting service & mailing list manager

Providing features through the storage class John Cowan (30 Jul 2015 01:48 UTC)
Re: Providing features through the storage class Bradley Lucier (31 Jul 2015 21:39 UTC)
Re: Providing features through the storage class John Cowan (01 Aug 2015 03:31 UTC)
Re: Providing features through the storage class Bradley Lucier (19 Sep 2015 21:53 UTC)
Re: Providing features through the storage class John Cowan (19 Sep 2015 22:38 UTC)

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