Skip to content
Tcl Source Code Changes To index Object Type
Login

Changes To index Object Type

Changes to "index Object Type" between 2014-10-11 03:55:18 and 2014-10-11 04:09:46

︙
27
28
29
30
31
32
33


34














27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50







+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
  *  [String Processing]
  *  [Bytecode]
  *  [List Parsing]
  *  [numeric Object Type]

<h1>Discussion</h1>

An "index" value remembers the lookup of a string in a table of
strings.

Unless Object Types change a lot, the routines SetIndexFromAny and
UpdateStringOfIndex do not need to exist.  The object type is a caching
one only, saving a table lookup result.  There are no pure "index" values.

<b>Tcl_WrongNumArgs</b> is piled high with hackery, special cases
and ugliness to bend it into useful service for ensembles, and possibly
Itcl command variants as well.  Surely a do-over with a clear vision of
the support task from the beginning could be better.

The completion codes extractor might be good public.

There's no need to worry about INT_MAX restrictions here.  These tools
are for looking up in small tables of small strings via linear search.
No need for major sophistication here.