What is Expressiveness in a Computer Language

Pascal Costanza pc at p-cos.net
Thu Jun 22 08:15:13 EDT 2006


Andreas Rossberg wrote:
> Pascal Costanza wrote:
>>
>> Consider a simple expression like 'a + b': In a dynamically typed 
>> language, all I need to have in mind is that the program will attempt 
>> to add two numbers. In a statically typed language, I additionally 
>> need to know that there must a guarantee that a and b will always hold 
>> numbers.
> 
> I'm confused. Are you telling that you just write a+b in your programs 
> without trying to ensure that a and b are in fact numbers??

Basically, yes.

Note that this is a simplistic example. Consider, instead, sending a 
message to an object, or calling a generic function, without ensuring 
that there will be applicable methods for all possible cases. When I get 
a "message not understood" exception, I can then decide whether that 
kind of object shouldn't be a receiver in the first place, or else 
whether I should define an appropriate method. I don't want to be forced 
to decide this upfront, because either I don't want to be bothered, or 
maybe I simply can't because I don't understand the domain well enough 
yet, or maybe I want to keep a hook to be able to update the program 
appropriately while it is running.


Pascal

-- 
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/



More information about the Python-list mailing list