Skip to content
Tcl Source Code Artifact [52a45e7a0e]
Login

Artifact [52a45e7a0e]

Artifact 52a45e7a0e6365d3c6476e2d3449e10a82272b3f:

Wiki page [dict Object Type] by dgp on 2014-10-09 23:33:07.
D 2014-10-09T23:33:07.486
L dict\sObject\sType
P 44ac9371c22d8ba51e112a31349d97bc8869f1e8
U dgp
W 1828
<h1>Source Files</h1>
  *  [/finfo?name=generic/tclDictObj.c|tclDictObj.c]

<h1>Public Interface</h1>
  *  Tcl_DictObjPut
  *  Tcl_DictObjGet
  *  Tcl_DictObjRemove
  *  Tcl_DictObjSize
  *  Tcl_DictObjFirst
  *  Tcl_DictObjNext
  *  Tcl_DictObjDone
  *  Tcl_DictObjPutKeyList
  *  Tcl_DictObjRemoveKeyList
  *  Tcl_NewDictObj
  *  Tcl_DbNewDictObj

<h1>Private Interface</h1>
  *  TclTraceDictPath
  *  TclDictWithInit
  *  TclDictWithFinish
  *  TclInitDictCmd
  *  tclDictType

<h1>Directly Depends On Public Interface Of</h1>
  *  [Hash Tables]
  *  [Tcl_Obj System]
  *  [Panic]
  *  [Parsing and Evaluation]
  *  [string Object Type]
  *  [index Object Type]
  *  [list Object Type]
  *  [String Processing]
  *  [numeric Object Types]
  *  [Variable Commands and Interfaces]

<h1>Directly Depends On Private Interface of</h1>
  *  [Bytecode]
  *  [Tcl_Obj System]
  *  [List Parsing]
  *  [list Object Type]
  *  [string Object Type]
  *  [Parsing and Evaluation]
  *  [Variable Commands and Interfaces]
  *  [namespace]

<h1>Discussion</h1>

<b>Tcl_DictObjSize</b> returns an int, imposing the same
 INT_MAX size limitations as in other parts of Tcl.

The <b>*KeyList</b> functions use an int argument to specify
the length of the key list.  It's less clear whether this limit is
as important.  (Should dicts be deep as well as wide?)

<i>I think it's not important.  The key list interfaces are 'only'
conveniences.  They do not make anything fundamentally 
possible that repeated single key calls could not do.  Contrast
with the size limit, where a dict with too many keys is
fundamentally unable to correctly report its size.</i>

The filtering script of <b>dict filter</b> is not NRE-enabled.
Perhaps it should not be (similar to <b>lsort -command</b>) ?
Z 1baf18636a52ab84d2c44561ee0f90b7