What is Expressiveness in a Computer Language

Chris F Clark cfc at shell01.TheWorld.com
Wed Jun 21 18:04:29 EDT 2006


Chris F Clark schrieb:
> In that sense, a static type system is eliminating tags, because the
> information is pre-computed and not explicitly stored as a part of the
> computation.  Now, you may not view the tag as being there, but in my
> mind if there exists a way of perfoming the computation that requires
> tags, the tag was there and that tag has been eliminated.

Joachim Durchholz replied:
> On a semantic level, the tag is always there - it's the type (and
> definitely part of an axiomatic definition of the language).
> Tag elimination is "just" an optimization.

I agree the tag is always there in the abstract.  

However, for the work I do the optimization of the tag at runtime is
important, and we specifically change things into types when we know
the system can do that optimization, because then we are getting the
system to do the work we would have to do and validating that the job
is done correctly.  So, I care that the tag is eliminated in practice
(and remains in theory--I have to have both).

In the end, I'm trying to fit things which are "too big" and "too
slow" into much less space and time, using types to help me reliably
make my program smaller and faster is just one trick.  It's a really
great and non-obvious one though, and one I'm glad I learned.  Any
algebra I can learn that helps me solve my problems better is
appreciated.  

However, I also know that my way of thinking about it is fringe.  Most
people don't think that the purpose of types is to help one write
reliably tighter code.

Still, knowing about dynmic typing (tagging) and static typing, helped
me understand this trick.  Thus, conflating the two meanings may at
some level be confusing.  However, for me, they aided understanding
something that I needed to learn.

-Chris



More information about the Python-list mailing list