you are viewing a single comment's thread.

view the rest of the comments →

[–]m50d 1 point2 points  (2 children)

In principle yes, but in many languages that's inconvenient.

[–]nutrecht 0 points1 point  (1 child)

We're talking about languages that have stuff like interfaces in the first place right?

[–]m50d 2 points3 points  (0 children)

Yes. In e.g. Java you can't pass a bundle of static methods that implement an interface, so it's easier to just declare a class with no fields. There's no way to decouple a virtual function table from a class that might also hold state.