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

Changes To Object Type Registration

Changes to "Object Type Registration" between 2014-09-15 01:29:25 and 2014-09-15 02:44:06

︙
48
49
50
51
52
53
54



55

56
57
58
59
60
61
62
48
49
50
51
52
53
54
55
56
57

58
59
60
61
62
63
64
65







+
+
+
-
+







Instead, the same function would be in whatever GetFooFromObj
routine it may supply.  Also with no <b>Tcl_ConvertToType</b>
to call, there is no need for any caller to access an arbitrary
Tcl_ObjType, so there's no need for <b>Tcl_GetObjType</b>.
And if no <b>Tcl_GetObjType</b> will be pulling types out
of registration, then no <b>Tcl_RegisterObjType</b> needs
to put them in there, nor do we need any mechanism to list
the types available.  In fact, there's ultimately no need for an
object type to have a string name at all (though it is helpful
in error reporting and debugging with the representation
the types available.  The end result is a system with far
command).  The end result is a system with far
greater decoupling, where every <b>Tcl_ObjType</b> struct
can have file static scope, which is helpful for independent,
non-coordinated development of interoperating modules.

Besides the advantages of a more decoupled system, there
are other problems with object type registration in that it has
never been well defined how to properly resolve any collisions
︙