简体   繁体   中英

What is the need of 'goog.structs' when 'goog.object' is there?

What is it that goog.structs provides which goog.object does not? I went through the documentation but didn't find anything satisfying, except the top line of goog.structs saying:

Generics method for collection-like classes and objects.

What is a collection-like class or object in javascript? As far as I know, about javascript every object satisfies being 'collection-like'.

What am I missing here?

goog.structs is a namespace containing a wide variety of specific classes for specific things, like CircularBuffer , Trie , Queue , Set , and so on. goog.object is a fairly basic container.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM