Is this mad?
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Thu Apr 17 10:00:49 EDT 2008
Bonjour Rob,
Le 17 avr. 08 à 14:38, Beynon, Rob a écrit :
> Sometimes when writing code, I write things like
> Repeat for each line protein in allProteins
> Repeat for each char aminoAcid in protein
> Etc etc
>
> I'd really like this to look like this, defining a new function
> 'synonym'
>
> make protein a synonym of line
> make aminoAcid a synonym of char
>
> Repeat for each protein in allProteins
> Repeat for each aminoAcid in protein
>
> Etc etc
>
> Does the extensibility/flexibility make code easier or harder to
> read/use?
Not mad at all :-)
More, it's 'perfect' English like xTalk, surely more understandable.
When you use tLine you think as an 'almost abstract' programmer;
using tProtein you rely on a biological process you want to set.
Just have a look at http://www.fourthworld.com/embassy/articles/
scriptstyle.html to mix names that make sense and some good habits
listed by Richard that will enforce understandability :-)
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list