3 ms·
I understand the feeling, but object inheritance goes a bit beyond this model, doesn't it? You could have, through some convention, the inheritance tree encode
by rtpg 9y ago
I understand the feeling, but object inheritance goes a bit beyond this model, doesn't it?
You could have, through some convention, the inheritance tree encoded into structs, but that's true of every language feature really. At no point do mots language feature stop being "structs + functions", because that encodes data + code.
- white-flame 9y agoMy experience with inference-based programming does deviate some from that model. Data is scattered throughout a knowledge base in individual data points & statements, and only the current ephemeral binding set is the organizational glue that gathers the data together for operation. Structs and OO by contrast could be considered as premature composition. ;-)
- psyc 9y agoInheritance = nested structs
- humanrebar 9y agoWell, it's nested structs whether you like it or not. There are pros (no messing with private state in new and untested ways) and cons (you get all the private state even if you only need the one boolean) associated.