Alternative Syntax options?

Are you developing tools to extend the LiveCode environment? This is the place to talk about the nuts and bolts of extending our nuts and bolts. If you want to use a LiveCode or third party Environment extension, visit the Using Evironment Extensions forum.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Alternative Syntax options?

Post by richervin » Sun Jul 13, 2014 9:27 am

I've been looking for information about alternative syntaxes for LiveCode, which I understood was on of the expected outcomes of the Open Source release.

Basically, I'm very unhappy with the so-called "natural language" syntax. I would much prefer a strict syntax with strong type casting, fewer keywords, and more compact syntax for references to object attributes.

Java would be great, but really I would take any syntax that is compact, non-ambiguous, strongly type, and uses more conventional syntax to access object attributes/methods.

Did this ever come out of the OpenSource effort? Or from RunRev directly?

I stopped trying to use RunReve about 2 years ago. I want to start developing mobile apps with RunRev, but am still unhappy with the support. It's enough to have to deal with their terrible looking Win3.1 style widgets and having to code basic scaling features - having to guess at syntax and the effects of certain keywords was just more than I was willing to deal with.
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2788
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Alternative Syntax options?

Post by richmond62 » Sun Jul 13, 2014 8:04 pm

You seem to have developed a bad taste in your mouth fairly quickly.

"guess at syntax" really? Well there are 2 resources that can stop the need to guess at synatx:

1. The in-built Dictionary; where the syntax for about 99% of the language is explained.

2. The Livecode Use-List, where there are lots of very helpful people who are willing to assist you.

"Basically, I'm very unhappy with the so-called "natural language" syntax. I would much prefer a strict syntax with strong type casting, fewer keywords, and more compact syntax for references to object attributes."

At this point I am tempted to say that Livecode is not for you.

Livecode (as I am sure you are aware) grew out of a revolutionary approach to programming developed by
people at Apple computer in the late 1980s. It is the "natural language" (and I'm not entirely clear why you feel a need
to put that between quotation marks as Livecode is considerably more NATURAL vis-a-vis language compared
with the vast majority of programming languages.

A lot of people who come to LIvecode from a background of other programming languages find that what I would call
the "Psychological baggage" of those other languages makes them expect Livecode to adhere to that model: and the
whole point about Livecode is that it does NOT adhere to that model; and once one becomes used to it, and accepts that,
Livecode seems rather better than those langauges (such as Java).

There are very many people who are very keen on Livecode's near natural language syntax, and I, for one, can see no
particular reason wny Revolution needs to adopt an alternative syntax. There are other programming languages such as C
and Java for people who like that sort of thing.

------------------

However; I would urge you, before abandoning Livecode in high dudgeon to:

1. Consider what I said, and think that Livecode involves a paradigm shift, so it it not particularly useful trying to fit
it into the old paradigm.

2. Give it time.

3. Avail yourself of the resources I mentioned above.
Last edited by richmond62 on Sun Jul 13, 2014 10:37 pm, edited 1 time in total.

richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Re: Alternative Syntax options?

Post by richervin » Sun Jul 13, 2014 10:11 pm

Thanks for the history lesson, though it was unneccesary since I've developed in more than a dozen languages and systems since 1978 including HyperCard and Visual Basic in the 1990's. I've already given LiveCode more time that I would care to.

I was originally looking for a Visual Basic like product for cross-platform mobile development, and came across this.

Any information about the ability to use a different syntax, make the existing syntax more compact and more strictly typecast, or a reference to the language with compact and non-ambiguous syntax is appreciated.

I understood this would be a new feature capability of the LiveCode platform and am merely trying to find out if it ever happened.
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2788
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Alternative Syntax options?

Post by richmond62 » Sun Jul 13, 2014 10:44 pm

If you are looking for something like Visual BASIC that is cross-platform, have you looked at XOJO (the IDE previously known as Prince, umm, RealBASIC)?

https://xojo.com/

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6211
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Alternative Syntax options?

Post by FourthWorld » Mon Jul 14, 2014 2:14 am

LiveCode will never be like C, but there are plenty of C tools out there so between those and the hundreds of other languages everyone can find one they really enjoy.

As for LC's Open Language initiative, the video on this blog outlines current status and where it's headed:
http://livecode.com/blog/2014/07/08/the ... ts-themes/
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4699
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Alternative Syntax options?

Post by jacque » Mon Jul 14, 2014 4:34 pm

It's enough to have to deal with their terrible looking Win3.1 style widgets and having to code basic scaling features


As mentioned, native appearance is well underway and automatic scaling is already in place. Give the latest version a try to see that.

I understand how you feel about syntax structure because I feel the same way when I try to write in any other language. I think if you just give it a chance it will begin to feel more natural and you may find that many of your objections disappear.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Re: Alternative Syntax options?

Post by richervin » Tue Jul 15, 2014 11:50 pm

If automatic scaling and native look and feel are in place, then yes I agree I can live with the syntax. The most frustrating part of the verbose syntax is in developing dozens of line of code with very highly technical functionality.

If that can be severely reduced, and the majority of the code is business-function, then the extended syntax makes a lot more sense!

Thanks for the updated info links, and I'm looking forward to developing many great Android apps in the future!
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4699
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Alternative Syntax options?

Post by jacque » Wed Jul 16, 2014 3:18 am

Now you've got me curious. What kind of technical functionality? Want help?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: Alternative Syntax options?

Post by rinzwind » Tue Oct 21, 2014 11:52 am

I understand the criticism. Most programming language have some common syntax rules that's more compact than LiveCodes

like
a = b + 1
while LiveCode has this
put b + 1 into a

But more cumbersome are object properties. LiveCodes syntax does not allow autocomplete features in the IDE because the target comes after the property...
a = card1.function1

'Normal' programming language have the 'logic construction' bigger scope before smaller scope (mainObject.SubObject.Function).

in LiveCode something like
send "function1" to card "card1"
put the result into a

And indeed... not supplying decent native GUI controls when advertising cross platform mobile development is just not good.

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 642
Joined: Fri Jun 27, 2008 9:00 pm

Re: Alternative Syntax options?

Post by Mikey » Tue Oct 21, 2014 2:40 pm

a couple of things:

1) we are (very informally) starting to mess with the script editor. There isn't any reason why you can't add dot notation, or live drop-downs for autocomplete, or some of the other features you would like, since all the code is just sitting there, begging for you to fix it.
2) Native controls criticism is definitely valid. The good news is that tmc and mg are both available, and at least give you skinning until we get natives. I personally prefer tmc, and Scott has been absolutely terriffic to work with when it comes to helping me when I wanted to do make one of his controls do something a little more...advanced.


On the good news side,
1) I keep waiting for Xojo, or any tool, for that matter, to give me anything helpful on mobile, especially cross-platform. In that time I have built a pile of very cool mobile apps for ios and android, LC's warts not withstanding.
2) The very forgiving nature of the tool and the very intuitive syntax, for me, more than make up for the additional keystrokes. Maybe I don't mind, because I had a typing class in a prior life, and everywhere I work I have a dasKeyboard (Model S Ultimate, of course), so I can fly, and my brain and I have found that the pace my brain works at and the amount of time it takes to type code in LC are pretty much in sync.
3) Implicit variable typing more than makes up for extra keystrokes. There's no stupid casting, no coercing, no headers, you know, unless you want to do that, then you're free to do it.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6211
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Alternative Syntax options?

Post by FourthWorld » Tue Oct 21, 2014 4:12 pm

Mikey wrote:The very forgiving nature of the tool and the very intuitive syntax, for me, more than make up for the additional keystrokes.
The core issue here is that most comparisons are made at the statement level, but not looking at the code base as a whole.

A given LiveCode statement may often be longer than the average statement in lower-level languages, but overall you usually have much fewer statements in LiveCode, with each one doing the work of dozens of hundreds on some other languages.

As for property assignments as one of the clearest examples of verbosity in LiveCode, I believe v8 will provide alternative syntax for that which many will find quite satisfying.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply

Return to “Extending LiveCode”