[plt-scheme] macro question

From: Jos Koot (jos.koot at telefonica.net)
Date: Tue Jun 10 13:46:16 EDT 2008

Much of this discussion is above my head. Yet a few short, may be silly, 
remarks.

I am inclined to think that in a typed Scheme (or any typed language) much 
type checking can be done during compilation, thus providing the possibility 
to omit a possibly large number of type checks at run time. Compiles a 
little bit slower, but runs faster. This may be important for programs that 
are compiled once in order to run often.

My personal opinion is that types do not significantly improve readability 
of programs. A good similarity between data structure and the structure of 
the procedures acting on these data is far more important, I think (this I 
did experience, but not invent by myself, of course)

And of course a typed Scheme should not decrease the possibility to write 
generic procedures (as is easily done in Scheme) Mho.

And how is this related to writing very general procedures that are 
independent of the data representation? For example, when parameterized for 
the correct accessor and comparator, a binary search in a sorted string can 
be exactly the same as one in a sorted vector. Please don't convert Scheme 
into C++, which requires explicit overloading of operators. I never felt 
comfortable with the overloading tools of C++. How would a typed Scheme 
handle procedure *sort*? It should, if possible at compile time, check that 
the object to be sorted and the comparator are compatible with each other.
Jos



Posted on the users mailing list.