Dylan compared to Python

Paul Prescod paul at prescod.net
Thu May 20 18:22:44 EDT 1999


Tim Peters wrote:
> 
> so-many-electrons-so-little-time-ly y'rs  - tim

It seems like Dylan implements polymorphism by allowing a "generic
function" to dispatch on multiple arguments. How does this work with
separate compilation?

In Python I can do this:

def a( foo ):
	foo.a()

and foo could take an infinite number of types. This code can be
"compiled" (byte-compiled) without knowing what type foo will take at
runtime. To implement this feature in statically typed languages usually
requires pre-declared interfaces and/or subclassing. Is this the case with
Dylan?

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

"It's only a movie. People should get a life." 
 - George Lucas (http://www.nypost.com/news/9025.htm)




More information about the Python-list mailing list