>>13681225>>Can I loop over the fields of a struct?Easily if they’re all the same data type or take the same amount of space. Simply union the struct with an array.
Variable data types? You’re going to have to write support for generic types, but you once you do, you can literally write an iterator to do it.
The reason people like C is because of its minimalism with regards to the machine. I agree that people have been bullied into liking it for every computer task out there, but complaining that an aliasing language for assembly doesn’t have support for first class functions or out of the box advanced iterators is kind of stupid is it not? Relative to the overhead you want when you use C, you don’t want these features which obscure what you’re doing with the amorphous block of memory.