Two questions about trev

Richard Gaskin ambassador at fourthworld.com
Mon Sep 14 11:43:19 EDT 2009


Jerry Daniels wrote:

> I do think that there is a conceptual model of what a script is: a  
> single body of text. Inserting folders into the code REALLY slows down  
> rendering. We have links in our code now, I found embedded folder  
> images made script rendering slow. Super slow.
> 
> Furthermore, the nature of the script that i think is antithetical is  
> the flexibility of rev talk. How many ways can you write if-then- 
> else's? Lots. I've actually tried and used folders in rev scripts and  
> it wasn't as rewarding as I would have thought.

This may ultimately be merely a matter of taste, but my own preference 
mirrors yours.

I believe there is cognitive value in seeing the thing you're working 
on, and as you note a script is a block of text.  A good editor can make 
it easy to navigate that block of text, but altering how it's displayed 
is not without tradeoffs.

Folding hides complex code, but doesn't make it any simpler.  In fact, 
once could argue it encourages complexity by making it easy to ignore it.

Showing code as it is is like a mirror to your mind:  you can't ignore 
the blemishes.

If a handler is so long that folding would seem useful, sometimes that 
can be an indication that it might be useful to consider breaking it 
into subroutines.

--
  Richard Gaskin
  Fourth World
  Revolution training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com



More information about the use-livecode mailing list