Inherited Headaches
Posted: Thu Mar 23, 2023 9:00 am
Carried over from 'over there' as this sort of dicussion should be here rather than there:
- -NoN' wrote: ↑
Mon Mar 20, 2023 3:04 pm
I've been wondering for a long time - probably very naively - about "inheritance" in Livecode.
We regularly read that there is no inheritance in LC. But can't/shouldn't we consider that the "start using" command constitutes a declaration of inheritance?
The called stack then becomes the base class and the calling stack becomes the derived class?
Sorry for the late answer - too much 'actual' work
You can kinda do what you say, and in fact it's been explored in detail:
Part 1: http://newsletters.livecode.com/novembe ... etter2.php
Part 2: http://newsletters.livecode.com/novembe ... etter2.php
So yes, while you can emulate aspects of OOP with inheritance, in practice it becomes more work that it's worth IMHO - it's not native to the language, and therefore requires a lot of effort from the developer... Now perhaps that would be a good target for OpenXTalk's development...