3 ms·
TableGen isn't trying to be similar to C++, it's trying to be a language that makes it easy to specify highly redundant data tables. Now, when you're writing a
by jcranmer 3y ago
TableGen isn't trying to be similar to C++, it's trying to be a language that makes it easy to specify highly redundant data tables.
Now, when you're writing an LLVM backend, these tables are immediately consumed by another tool that tries to write a very complex state machine based on these tables, and the formats of the tables that said tool expects is essentially undocumented and confusing, and the error messages tend to range from confusing to, well, straight up misleading. But technically that's not the fault of TableGen, that's the fault of that TableGen-based tool.
- fooker 3y agoI don't doubt the 'what', clearly it's needed. My point was about the 'how'. See the following example code from the manual and tell me it doesn't resemble C++ if you squint. class PersonName<string name> { assert ... string Name = name; } class Person<string name, int age> : PersonName<name> { assert ... int Age = age; } def Rec20 : Person<"Donald Knuth", 60> { ... }