Re: [Scheme-reports] Seeking review of sets and hash tables proposals Per Bothner (25 May 2013 23:55 UTC)

Re: [Scheme-reports] Seeking review of sets and hash tables proposals Per Bothner 25 May 2013 23:55 UTC

On 05/25/2013 04:30 PM, John Cowan wrote:
> Per Bothner scripsit:
>
>> I note that Java includes an extensible set of "collections classes"
>> - but no Bag class that I can find.  That suggests demand is pretty low.
>
> Because bags are basically unconstrained, the interface for them in Java
> is simply Collection.

Well, the classes implementing Collection generally also implement
Set/List/Map.  There are some exceptions (like BeanContextSupport
and Queue), but they're not very bag-like.  If you do implement
Collection (for example by extending AbstractCollection), there
is no support for bag-count/bag-increment!/bag-decrement!.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports