assign by reference - a comment

David Vaughan drvaughan55 at
Fri Mar 22 16:38:01 EST 2002

Hi all

I have watched this thread (now pretty much dead) very quietly but the 
last few posts inspire me to make a general point captured well by Rob 
in his ironic "...capability of writing self-modifying code. Think about 
he potential of that feature."

That Rev offers you pass-by-reference is nifty, but a general capability 
to substitute handles for contents for in-line coding is not really what 
xTalk is about. I recall over twenty years ago rewriting much of a 
microcomputer OS, (CP/M, BDOS and Morrow's Disk Jockey, for those with 
beards long enough to have heard) for enormous gains in memory space (I 
had 64KB in which to squeeze the OS and apps), speed and functionality. 
Of course, I did this in part by writing "self-aware" and self-modifying 
code. Later, I squeezed wonderful things out of Pascal on the same box 
by intelligent resort to in-line assembler where I could manage pointers 
directly, and then made HyperTalk fly by similar techniques in 
CompileIt! even when the latter first came out and took 45 minutes to 
compile one script.

This was fun. It was efficient to write and dare I say very elegant in 
places. I understood what I was doing the time. But as 
maintainable code it sucked, while to a reader other than myself it was 
like something out of the trees. The problem is that you tend not to 
appreciate the attention and skill you are applying at the time you 
first write and debug it and even then the latter task rapidly becomes 
all hell because you frankly have no real idea of to what a variable 
refers if its contents can be a reference to any other variable.

Now, I know it is easy for you, your are expert and you can do it in 
your sleep. So why aren't you writing C, which was first promoted to 
micro users because it made these techniques easy to apply? Why is Java 
popular in the enterprise if it can be summarised as C++ _without_ 

xTalk and its MC/RR implementation is, as I continue to learn, 
marvellously powerful. I too enjoy doing fancy tricks with references 
and modifiers but a need to do that is exceptional, and should be left, 
as I have previously supported, to a CompileIt!-like add-on, not stuck 
in to the current language to confuse and damage the work of the mass of 
RR users.

Wow! I think I had better go quiet again for a while. Please don't beat 

regards to all

On Saturday, March 23, 2002, at 05:23 , Rob Cozens wrote:
> Hi Tom,
> No, neither Transcript nor any other Xtalk dialect I'm aware of 
> includes syntax for pointers or handles.  Some of us would like to see 
> it, at least so far as is necessary to support direct system calls from 
> Transcript.
> As an aside, not only can you resolve objects & variables at runtime; 
> you also have the capability of writing self-modifying code.  Think 
> about the potential of that feature.
> Yes, I see how using a pointer or handle reference "in line" would give 
> you the best of both worlds, Ben.  If you really want this kind of 
> syntax, I suggest you bring it up on the Xtalk List.

More information about the use-livecode mailing list