On Fri Feb 9 18:43:16 2024 +0000, Zebediah Figura wrote:
I don't see your point. Why not have it as an rbtree? We have it like
that for the compiler. There is one compare function, init/destroy, and that's it. I'm not saying it's a lot more work, but it's still a bit more work. You have to define two callbacks, for instance, which you don't have to do with a simpler data structure. I don't think it's wrong to say that *any* use of a more complex data structure in place of a simpler one deserves justification. The compiler uses an rbtree, but well, it was like that when I got here. The compiler also defines a lot more builtin types, and even then I'm not sure it's enough that an rbtree is *actually* an improvement.
No problem in switching to a list, on my side. For strings it's normally a larger number of elements, because every type name, string constant, and variable name is there, but also not necessarily relevant for performance reasons, until we have actual numbers.