LC to C# conversion
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
Message deleted as it just repeated something posted earlier.
Last edited by richmond62 on Tue Mar 21, 2023 1:58 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
So, I take it you haven't tried the ChatGPT thing?
Re: LC to C# conversion
No... from what I have seen of Chat GPT it's good for telling you how to make a fruit salad out of fruit, but much more complex than that and it will struggle. This is one of those breaking ground things that it can't just trawl the internet for the answer and regurgitate it, so I am not sure it will be useful.
XdM
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
Nothing wrong with fruit salad.
But I get your point.
However, some folk were suggesting it could write LiveCode . . .
But I get your point.
However, some folk were suggesting it could write LiveCode . . .
Re: LC to C# conversion
Sorry for the late answer - too much 'actual' workNoN' wrote: ↑Mon Mar 20, 2023 2:04 pmI'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?
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...
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
As far as I understand, at he moment, ALL that OXT is aiming at is an unlabelled version of the last community release of LC.Now perhaps that would be a good target for OpenXTalk's development...Now perhaps that would be a good target for OpenXTalk's development...
I would have thought that that sort of effort would need to be driven by the stimulus of potential financial gain.therefore requires a lot of effort from the developer
Re: LC to C# conversion
This is, as you may have guessed, the point of my comment.
Simply existing won’t draw in users. IMHO if OXT is to become sustainable, thrive and draw in more developers and users it has to offer something above and beyond rather than being a pale imitation.
Given the resources that LC have, competing on a feature by feature basis is going to be hard.
However the tools for an OOP approach are there; just not encouraged by the language and IDE. If OXT were to change that it may actually be a preferable destination for many… if marketing itself as object-oriented xTalk that would, I suspect, be a selling point for many non-LC-users.
Or maybe not - but just being a “free” pale imitation will only work for so long and then slowly disappear I suspect.
Simply existing won’t draw in users. IMHO if OXT is to become sustainable, thrive and draw in more developers and users it has to offer something above and beyond rather than being a pale imitation.
Given the resources that LC have, competing on a feature by feature basis is going to be hard.
However the tools for an OOP approach are there; just not encouraged by the language and IDE. If OXT were to change that it may actually be a preferable destination for many… if marketing itself as object-oriented xTalk that would, I suspect, be a selling point for many non-LC-users.
Or maybe not - but just being a “free” pale imitation will only work for so long and then slowly disappear I suspect.
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
I have a feeling that this is NOT the right place to discuss OXT [in fact the list-Mum has told me that directly], so it might
be sensible to either restart it or continue it on the OXT Forums.
https://openxtalk.org/forum/viewtopic.php?f=2&t=457
be sensible to either restart it or continue it on the OXT Forums.
https://openxtalk.org/forum/viewtopic.php?f=2&t=457
Re: LC to C# conversion
"Sorry for the late answer - too much 'actual' work "
Hello
@ Stam, It is my turn to be sorry for this late reply. What is curious is that I was not notified of your answer (?!).
And above all, I also apologize to Xero for diverting the course of his initial question.
Renaud
Hello
@ Stam, It is my turn to be sorry for this late reply. What is curious is that I was not notified of your answer (?!).
And above all, I also apologize to Xero for diverting the course of his initial question.
Renaud
Re: LC to C# conversion
Don't think it's a diversion really - the OP was a question about how to convert LCscript (a non-OOP language) to C# (an OOP language) - so to do this one would necessarily have to view the differences. Of course the actual question asked turned out to be a bit different, but that was the OP
Your question (now that I re-read it) was asking if 'start using' is a form if inheritance - well for me the answer has to be 'no'. It's just a library call, that's not what OOP/inheritance means... In no way does it substantiate a class, you cannot subclass a library or apply interfaces to it. The links I provided actually do show a good way to implement OOP structures in LC, but as neither the IDE nor language are geared towards this, it's a lot of hassle to implement (for now - perhaps the rumoured new widgets from LC groups will change that).
S.
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
Well after 10 months of apparent stagnation I would tend to ignore rumours and work with what we have.rumoured
Re: LC to C# conversion
With that logic none of the things we paid for (ie v10) will come to pass!
I remain an optimist
But admittedly an optimist with patience
I remain an optimist
But admittedly an optimist with patience
Re: LC to C# conversion
Thank you, Stam, for this very precise answer.
Renaud
Renaud
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LC to C# conversion
Some of "the things we paid for" were supposed to manifest themselves in the Open Source version,
for which quite a few people donated sums of money.
for which quite a few people donated sums of money.
-
- Posts: 634
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC to C# conversion
I'd say that, although xTalk language did arrive before the prevalence of Object Oriented C's (Objective C / C++), it's always felt very, sort of proto-OOP to me. And there has been various syntax added by different xTalk implementations over the years that have provided capabilities needed for doing OOP things ( object, aka 'controls', custom property for example, associative arrays for 'struct'-like data containers, etc.).stam wrote: ↑Wed Mar 22, 2023 10:07 pmSorry for the late answer - too much 'actual' workNoN' wrote: ↑Mon Mar 20, 2023 2:04 pmI'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?
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...
Extension Builder Widgets can maybe be thought of as custom objects too, they have their own methods or custom implementations of common methods.
The engine DOES in fact use inheritance to fill in property values when the property hasn't already been explicitly set, for example things like font or default foreColor, backColor, highlight colors , etc. will be inherited in order from text<field<-card<-stack<-window<-app(engine)<-operating system. Notice the 'use owner's font' or 'use owner's color' in the font menus, selecting those menu items tells the engine to use an inherited value for that property.