The paradigm of containers and self-referenced names

Mikey mikeythek at gmail.com
Fri Mar 25 22:12:26 EST 2005


Having written a couple of compilers, well, ok, having written several
compilers, I understand why compiler-writers like typed variables.  It
definitely makes life easier, and reduces by one the number of passes
required to go through someone's code.  In addition, it reduces the
amount of guessing and errors that are generated as a result.



HOWEVER


I DON'T GIVE A FLYING FIG ABOUT COMPILER-WRITERS.  I don't write
compilers any more, I use compilers.  I build cool applications.  A
monkey can write a compiler.  Temps can write compilers.  A compiler
is nothing more than an inconvenience, all things considered.  I
shouldn't have to think about it.

Implicit, implied typing is a tremendous leap in programming
languages.  I know what I mean, and the machine is my (uh, five letter
word for - never mind).  The only reason for even writing programs and
building applications the way we do is that I can't wave my hands and
describe in broad terms what I want and have it happen.  That's one of
the weird things about Western societies - the people at the top
dream, and the grunts execute.  Computers are lower than grunts. 
Compilers are the grunts' (five letter word).  The only reason that
compilers exist is because the Universal Translator hasn't been
invented yet.

Another tool that I use extensively, 4th Dimension, has implicit
typing, and generally the compiler does a pretty good job of figuring
out what I'm trying to do.  It also has several options for variable
typing:  All Variables are typed, Process and Interprocess Variables
are typed (i.e. non-locals are typed), and Type All Variables.  Mark
might like 4D better than RR.

Yet, Mark, the tool that might really be for you is one called Omnis. 
Omnis has been around forever.  My first consulting gig thirteen years
ago was using Omnis.  Once you type a variable in Omnis it does
something rather remarkable - it uses that information and tries to
fill in the blanks for you when a variable is required.   The code is
tokenized on the fly, and the <shudder/> context is known, thus Omnis
limits your ability to enter a variable name to the ones of the proper
type.  It definitely reduced the number of typos.  How many times have
you mixed up l (lower-case "ell"), and I (upper-case "eye")?  I don't
remember if Omnis would rename variables everywhere when you renamed
them in the declaration.

HOWEVER I still think the price paid was too high for the service. 
The number of mistakes prevented was small compared to the
inconvenience.  Besides, being able to polymorph-type variables is of
tremendous use.  You can't type variables and have them polymorph.

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list