LiveCode 10 - what are your thoughts on the new features?

Alex Tweedly alex at tweedly.net
Tue Sep 7 20:33:21 EDT 2021


On 07/09/2021 23:01, Martin Koob via use-livecode wrote:
> Hi all.
>
> There has been lots of discussion on the list and forums about the one part of Kevin’s announcement regarding the changes in licensing but nothing that I see on the other major part of the announcement — the new features coming in LiveCode 10.
Good idea for discussion - but we may be shooting in the dark, until 
either the DP or another sneak peek.
> New Syntax in 10
> 	Array Literals

Not sure I fully understand this one yet.
     put { "a": "b", "c":"d" } into tVar
seems clear - and is explained with an equivalent in existing code.

But
      put [1, 2, 3 ] into tVar2
isn't clear to me. If it was in Python it would be a list - but LC 
doesn't have 'lists'.

Is it equivalent to
    put true into tVar2[1]
    put true into tVar2[2]
    put true into tVar2[3]    ??

Or if not, then what is it equivalent to ?

But generally, I like the idea. Though it does just make me want to ask 
for more :-)

Why just constants ?

Why can't I say
     put { myvar: "first", anothervar: tWhatever } into tVar2   ?

> 	Constant Expressions

About time. I trust you can actually do
    constant Kmin=100, kMax=200, kMid=(kmin+kmax)/2

> 	Static Switch Optimization

Yes - good thing.I have a bunch of code (which I might not want to show 
in public), where this will make a significant difference. I was worried 
by the statement that "... recognises cases where all the cases are 
constant", but realised that you can always cover the other cases by 
putting them into a separate switch/if-then-else in the 'default' case.


> 	Constant folding

I confess I assumed that was already there :-)

But I was disappointed to not see my two biggest 'constant' wishes

1. multi-line constants e.g. amongst other ways, Python's

put """line 1

line 2

line 3""" into tVar

2. global constants. Most compiled languages will allow an 'include' 
file which can specify constants, which you can then rely on to be 
defined properly (and the same) everywhere. So that's probably too much 
at odds with LC's model - but could be handled by 'protect' global 
variables (or, I'm sure, another 10 ways that Mark W. could think of).

> 	Tail Expressions

I just don't understand this one, so no comment.

> Anyway I am excited to see the first DP which is promised in the next couple of weeks.  My wife and I have an ongoing disagreement about the term 'couple of’ in terms of counting.  I say it means around 2 or 3ish.  She says it means 2. Further she says if you wanted to say 3 or 4 you would say ‘a few’.  So in this case I am hoping she is right and I am wrong and we do get the new DP in a couple of weeks and not a few weeks. :-)

That sounds like a 'couple' discussion I wouldn't want to get in the 
middle of. Even worse than whether a sign on the freeway/motorway saying 
"xyz next exit" means the immediately coming exit (i.e. 'this exit' or 
'next exit'), or the following one. Caused me no end of trouble when I 
first moved to the US :-)

Alex.




More information about the use-livecode mailing list