Crazy script-only stack question
Geoff Canyon
gcanyon at gmail.com
Tue Jan 23 11:21:58 EST 2018
On Tue, Jan 23, 2018 at 1:49 AM, Mark Waddingham via use-livecode <
use-livecode at lists.runrev.com> wrote:
> On 2018-01-22 21:20, Geoff Canyon via use-livecode wrote:
>
>> Is there any reason script-only stacks had to be implemented in the
>> engine?
>>
>
> Yes - otherwise direct stack references or 'stackfiles' indirected
> references wouldn't work. You'd need a binary 'launcher' stack for each
> script, which would then be a bane for version control (which would have
> defeated their purpose).
>
Yep, I get that I was proposing a hack, non-100% solution. Hence "Crazy"
in the subject line ;-)
>
> In terms of behaviors, then they are another example of script objects -
> indeed, the object the script is attached to has little to do with any
> semantics of behaviors (although we did add 'this me', to allow resource
> resolution relative to the behavior object - I'd suggest not using it for
> anything else other than that ;)).
>
This actually raises another point (and I'm sure this is a discussion that
happened without me several years ago, but as long as we're here) is there
a reason to use "this me" which seems terribly awkward, over "the behavior
of me" which is to my ear far more straightforward (it didn't require any
additional code or syntax) if a bit more verbose?
> I'd propose the following:
>
> script <script-name> with behavior <behavior-name>
>
> Where <behavior-name> is resolved as a stack reference.
>
Sure, that sounds perfect.
gc
More information about the use-livecode
mailing list