The paradigm of containers and self-referenced names

Mark Wieder mwieder at ahsoftware.net
Thu Mar 24 15:28:39 EST 2005


Jacque-

Thursday, March 24, 2005, 10:25:32 AM, you wrote:

JLG> And you would have reaped the ire of those involved in 20 years of xtalk
JLG> legacy. ;)

I'm well aware of that. And would gladly shoulder that burden given
the chance. We've unlearned other HC habits along the way. "Mark
Wieder - he's the guy who made us declare our variables"... now that's
a moniker I could live with.

JLG> For those of us who have used all the various forms of xtalk over lo
JLG> these many years, the lack of variable typing and the ability to use
JLG> variables without first declaring them is a major breakthrough feature
JLG> of a modern programming language.

Actually I'd like variable typing as well <g>. But only when I want
it. Otherwise I also like the freedom and the fact that the engine
converts everything for me. No more ugly casts. Not declaring
variables before use, though... consider

on Gimme val1, val2

  put val1 * 10 into val3
  put val2 * 5 into val5
  return val3 + val4
end Gimme

where I accidentally typed "val5" instead of "val4" (slip of the
finger). You're not going to find this error (if you find it at all)
until runtime. The simple addition of the line

local val3, val4

and enabling variable checking allows you to catch the error at the
time you click the "Apply" button. Why not let the compiler help you?

JLG> me and I wonder why they don't just go off and use Basic where it is a
JLG> requirement. All that "dimming" really puts me off.

<actually it's not, unless you declare "option explicit">

JLG> Is it sloppy programming to use a language as it was intended?

Possibly. Look at (shudder) COBOL. Who in their right mind would
invent a "continue" statement?

-- 
-Mark Wieder
 mwieder at ahsoftware.net



More information about the use-livecode mailing list