On 6/7/22 10:55, Mark Waddingham via use-livecode wrote:
I don't buy the 'cognitively different' argument

Mark-

Thanks for the longish explanations there. I think we'll just have to disagree on the cognitive thing then - I normally would expect functions to return the result of some action, not just hand me back a constant. No worries though. Ruby deals with this very neatly: even though everything is an object the syntactic sugar allows you to code them like "normal" constants, the same way we can refer to xtalk global functions as "the capsLockKey" instead of "capsLockKey()".

FWIW, I'm not entirely sure whether what you (Mark) want from 'global constants' is quite the same as what Alex wants from 'global constants', and I'm not entirely sure whether what I *think* you both mean when you ask for 'global constants' is what you are actually thinking of when you ask for 'global constants'...

Hah! Well, whatever anyone else means, I'd like constants to obey the inheritance of the message path. An 'effective' constant if you will. But *PLEASE* don't implement that particular syntax.


In that vein, what would be helpful is, instead of just going 'can we have global constants', propose problems you need to solve / would like to solve and use-cases you have encountered where the existing xTalky feature set is not sufficient to solve it in some reasonably elegant fashion without 'global constants'.*

Thankfully I think there is nothing in this regard that is not expressible in the existing xtalk syntax. I use getter functions in my stack scripts (I don't think I've ever done that for a constant in a backscript) and sometimes I also just copy and paste constant declarations.

--
 Mark Wieder
 ahsoftw...@gmail.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to