Remove E2 typeids #2813
Denneisk
started this conversation in
Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In anticipation of a new E2 helper and the ability for users to create types, E2 typeids (i.e.,
b
,e
,xwl
, etc.) should be phased out or replaced with a much less explicit system.These restrict the total number of E2 types to a relatively small number1, most of which are unfavorable, and could cause collisions between two unrelated types2 (two addons implementing the same typeid). The E2 editor does not use typeids except in the helper and intellisense.
e2function
syntax does not use typeids. It seems the trajectory of E2 is putting typeids into the background, but I believe typeids can be removed outright.As far as I'm aware, they provide no real performance benefit. They are shorter than writing type names, but a new E2 Helper can just as easily only write the function name and then disambiguate on the page.3 A new
registerFunction
syntax could just as easily use full type names as well.If a typeid system is to be continued, it should be numerical and handled entirely by the extension loader.
Legacy considerations:
registerFunction
- Will want to allow old typeids to be used and just translate using a LUT to the new type ID.Footnotes
I calculated 702 at some point, which sounds great, but most combos such as
xqj
are obviously not going to be used if the developer can help it. ↩Booleans and bones are already a point of conflict within Wiremod itself. ↩
Starfall and Gmod wiki cannot be used as examples, obviously, so here are some for typed languages. An example on Microsoft's .NET docs. An example on cplusplus.com. ↩
Beta Was this translation helpful? Give feedback.
All reactions