Inherited Headaches

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Inherited Headaches

Post by richmond62 »

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...
-
Screen Shot 2023-03-23 at 11.01.24 am.png
Screen Shot 2023-03-23 at 11.01.24 am.png (49.46 KiB) Viewed 699 times
-
Screen Shot 2023-03-23 at 11.01.44 am.png
Screen Shot 2023-03-23 at 11.01.44 am.png (78.19 KiB) Viewed 699 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Inherited Headaches

Post by OpenXTalkPaul »

Well I won't go 'over there' to talk about OpenXTalk (as I agreed I wouldn't), but I will go over there to talk about inheritance, and how there is some inheritance in how the engine gets it's properties when they aren't explicitly defined (which came into play with 'darkMode' efforts).

I agree with Stan. I want to do much more with OpenXTalk then just de/re/branding it. That's why I have been, at least a little bit here and there along the way (such as darkMode) while I've simulataneously been learning the inner workings of the IDE. But I'm even more so intent on improvements-on (and self reliance, such as our own github sample-stacks repo), over and above the previous community edition, now that un-branding is largely done (I just found another one I'd missed the other day). As 'Disney' saying goes "Plus It"!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests