Writing Extensions

Mark Waddingham mark at livecode.com
Wed May 24 14:21:26 CEST 2017


On 2017-05-24 12:35, hh via use-livecode wrote:
> Switch in LCB -- Monte asked to have the opportunity to do the job:
> http://forums.livecode.com/viewtopic.php?p=131509#p131509

Yes... I'm not sure I quite see your point (especially as he said 'Is 
there any chance switch will be implemented as a control structure.', 
not 'how would I implement...') :)

So...

Would some sort of switch statement be useful in LCB? Yes - it is a 
generally useful thing to have.

Has anyone proposed *any* design yet which does not have the flaws (we'd 
like to avoid) in the C-switch mode? No (well until it came up on the 
list the other day - there's a conversation going on that topic now 
which might bear some fruit, at least in terms of a design).

Is 'switch' more important than a number of other things we need to do 
to LCB to meet its goals? No I don't think it is because it is 
equivalent to if/elseif/.../endif and we have that. For example, right 
now more code economy (taking into account the current main uses of LCB 
in the LiveCode ecosystem) would probably be gained (for example) by 
adding a bridge between LiveCode script's string lists, and LCB's lists; 
or enumerations or ...

There's a whole chasm between saying 'I want a switch control structure 
in LCB' and having a switch control structure in LCB. If there wasn't 
then no-one on this list who programs for a living would have a job - 
last time I checked I can't just ask my computer 'please implement the 
switch control structure in LCB' ;)

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps



More information about the use-livecode mailing list