[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic vs. static typing





Joe Marshall <jrm@ccs.neu.edu> wrote:
 >Another idea, for example, is a function that permutes a list of
 >elements.  The permute function doesn't need to know what the list
 >holds.  Sure you can parameterize the permute function on the type of
 >list, but isn't this passing inessential information?  Permute
 >certainly doesn't care.

Permute doesn't, but whatever is using the permuted list does---it is
going to need that information when it does something with the contents
of the list.  If you look at it from an information flow-ish standpoint,
the parameterized type for permute is saying that permute does not
change the type of the contents of the permuted list.

 >> The wedge product (or for that matter if I understand correctly, the
 >> function that takes a list of values and computes their product) doesn't
 >> require knowing the object types, but it does require knowing that the
 >> object types are "the same" in that it requires knowing a multiplication
 >> function that takes two elements and produces a new one.
 >
 >The wedge product doesn't need to know about the multiplication, it is the
 >`Hodge *' operator that does.

The wedge product is going to do one of two things: create and return
a new matrix or modify the matrix in place.  Something somewhere is
going to have to make sure that the 'Hodge *' operator will apply to the
elements of resulting matrix.


Tommy McGuire