2 ms·
Agreed. In the literal sense they are very much two keywords for the same concept, but culturally, a struct is POD and a class is not. Personally I think the m
by eropple 13y ago
Agreed. In the literal sense they are very much two keywords for the same concept, but culturally, a struct is POD and a class is not.
Personally I think the mistake was in making them the same. In Ides, a friend's LLVM-based PL (no contributions here, just some discussion and ideas), an instantiated 'struct' is a non-polymorphic object rather like in C#; this allows for more expressive code by logically attaching methods to the struct but without creating a vtable and breaking C compatibility.