[Haskell-cafe] haskell and reflection
Lauri Alanko
la at iki.fi
Tue Sep 11 13:11:58 EDT 2007
On Tue, Sep 11, 2007 at 07:33:54AM -0700, Greg Meredith wrote:
> Our analysis suggested the following breakdown
>
> - Structural reflection -- all data used in the evaluation of programs
> has a programmatic representation
> - Procedural reflection -- all execution machinery used in the
> evaluation of programs has a programmatic representation
>
> The Java notion of reflection is restricted entirely to the first case
Then what would you call ClassLoader.defineClass?
As for Haskell, there are various tools for both (at least
Data.Typeable and hs-plugins), but neither are truly type-safe: it is
possible to write code that uses these libraries and type-checks, yet
crashes. Static typing makes reflection very difficult to support
safely.
You might be interested in my MS thesis, where I explored these issues
in some more length: http://www.cs.helsinki.fi/u/lealanko/alanko04types.pdf
Lauri
More information about the Haskell-Cafe
mailing list