[log in to unmask] wrote:
...
> Dan Nagle also proposed an "Assumed-kind" procedure, which is similar
> to what James proposes, but with "*" instead of "^k1" for the kinds.
>
> What James and Dan are proposing is a bit simpler in the special case of
> kind, but (at least as far as I can tell) doesn't handle the more general
> cases that Aleks and I want to handle.
Well, I don't speak for Dan's proposal, but the proposal I'm still
formulating is completely general. Conceptually, the ideal of inference
is the only really new concept. I will be able to implement procedures
that are generic with respect to type.
> Aleks and I both propose that package parameters not be limited to
> integers. We propose that package parameters can be and kind of value,
> types, procedures, and packages. The procedures can be either specific
> or generic, and the packages can be instances or "templates."
The problem with both your approaches is that they are syntactically
cumbersome and yet are still limited to template style implementations.
If you notice on the inferred KIND example, only the semantics of the
program is determined by the form of code. An implementation is
free to actually implement the generic operations any way it chooses,
not merely by preprocessing multiple instances.
--
J. Giles
|