Transcript language design.

Alex Tweedly alex at tweedly.net
Wed Jun 9 19:11:53 EDT 2004


One of the things that is a bit of a hurdle for a "traditional language 
programmer" (like me) to overcome is the unusual syntax and verbosity of 
Transcript. I'm trying to convince myself that this will feel more natural 
if I just keep trying :-)

Are there any "style" hints or suggestions to help with this ?

I've spent today making "simple" changes to the tutorial scripts; the three 
issues that have occupied an embarrassingly large number of hours today 
have been

1.  Simple script.
     put "something" into field1
Of course, what I meant was
     put "something" into field field1
so it was disappearing into an unintended local variable.

When I finally spotted this, I decided I should turn on explicitVariables - 
but the documentation warns against doing this in development mode  (I 
can't actually find this paragraph again - but there was definitely a 
paragraph about "this can help you find hard to debug problems. If you use 
this, you should use "Suspend Development Tools" to avoid 
confusion").  Does this really cause problems ?

2. String concatenation
I had
     put URL "file:" & fileName into myVar
of course, I meant
     put URL ("file:" & fileName) into myVar
or similar.

I don't think I've ever encountered a language where a valid expression 
could cause unwanted side-effects in an expression using only a single 
instance of an operator. Sigh.

3. Traditional programing style.
I forgot myself and wrote a traditional line of code
     myVar = 1
when I meant
     put 1 into myVar
OK, my error; but I sure wish the compiler could warn me when I write an 
expression and never use it (or something to catch my slips into 
traditional languages)

Sorry if this email is too close to a "vent of frustration" - but I'd 
really like to find a way to use Rev without wasting so much time in the 
"gentle" learning curve.
Any suggestions on programming style welcomed.

-- Alex Tweedly.

-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 04/06/2004


More information about the use-livecode mailing list