Making the move...

Geoff Canyon gcanyon at inspiredlogic.com
Mon Mar 20 09:42:33 CST 2006


Do you have an example? I agree that if you end up passing in a  
handful of arguments by reference, you haven't accomplished much by  
breaking out the routine. The question is if there isn't a better way  
to slice the routine, where that wouldn't be necessary.

On Mar 20, 2006, at 4:29 AM, Sarah Reichelt wrote:

> In my experience, it's probably due to never passing values by
> reference. If I am working on a routine that generates multiple
> variables, then acts on them, it is easier to keep it all together
> than to try and transfer more than one variable back & forth between
> handlers & functions.
>
> A separate function is great if it only has to return one variable,
> but as soon as it acts on more than one, I find it easier to leave
> that code as part of the main handler.
>
> Of course, if a segment of code is used by more than one handler, it's
> worth the effort to split it out, but otherwise, I'm not too fussed
> about keeping handlers small. Good commenting can overcome any
> problems interpreting it later :-)




More information about the use-livecode mailing list