What is Expressiveness in a Computer Language

Darren New dnew at san.rr.com
Tue Jun 20 11:52:46 EDT 2006


Rob Thorpe wrote:
> Yes, but the point is, as the other poster mentioned: values defined by
> a class.

A value can only represent one value, right? Or can a value have 
multiple values?

> For example, in lisp:
> "xyz" is a string, 

"xyz" cannot represent values from the class of strings. It can only 
represent one value.

I think that's what the others are getting at.

>>They all have - the whole purpose of a type system is to ensure that any
>>expression of type T always evaluates to a value of type T.
> 
> But it only gaurantees this because the variables themselves have a
> type, the values themselves do not.  

Sure they do. 23.5e3 is a "real" in Pascal, and there's no variable there.

("hello" % "there") is illegal in most languages, because the modulo 
operator doesn't apply to strings. How could this be determined at 
compile time if "hello" and "there" don't have types?

-- 
   Darren New / San Diego, CA, USA (PST)
     My Bath Fu is strong, as I have
     studied under the Showerin' Monks.



More information about the Python-list mailing list