Re: What is Expressiveness in a Computer Language

2006-06-27 Thread Greg Buchholz
ng like... (define (apply fun args) (eval (cons fun args))) ...but "eval" seems a little like overkill. Is there a better way? Greg Buchholz -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-27 Thread Greg Buchholz
ray, so you can't use an index from one array with a different array. You'll probably also enjoy the paper... "Eliminating Array Bound Checking Through Dependent Types" http://citeseer.ist.psu.edu/xi98eliminating.html ...and DML itself... http://www.cs.bu.edu/~hw

Re: What is Expressiveness in a Computer Language

2006-06-27 Thread Greg Buchholz
Chris F Clark wrote: > Very impressive. It looks right to me and simple enough to > understand. I must find the time to learn a modern FP language. Can > you write a fold for this that prints the data as a binary tree of > triples? I have to believe it isn't that hard {- Refactoring this a

Re: What is Expressiveness in a Computer Language

2006-06-26 Thread Greg Buchholz
Chris F Clark wrote: > Thus, as we traverse a list, the first element might be an integer, > the second a floating point value, the third a sub-list, the fourth > and fifth, two more integers, and so on. If you look statically at > the head of the list, we have a very wide union of types going by.

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Greg Buchholz
George Neuner wrote: > You can't totally prevent it ... if the index computation involves > types having a wider range, frequently the solution is to compute a > wide index value and then narrow it. But if the wider value is out of > range for the narrow type you have a problem. > ...snip... > > T