[Haskell] Dynamic binding
rossberg at ps.uni-sb.de
Thu Jun 23 08:45:34 EDT 2005
Ralf Lammel wrote:
>>"dynamic binding" is just the OOO way of saying
>>"calling a first-class function").
> Let me presume that dynamic binding
> was meant here in the sense of late binding
> in the sense of subtyping polymorphism.
No, as far as I read it, "dynamic" or "late binding" is orthogonal to
subtyping, or typing in general. It is just that most typed OO languages
lump these concepts together.
For me, "dynamic" or "late" binding just means calling (or more
generally, accessing) something that is not determined statically. That
is precisely what first-class functions provide.
Objects just turn more complex uses of this idiom into a language
concept. Operationally, objects are equivalent to records of first-class
functions. They usually come with more flexible typing and more
efficient implementation, though.
> (First-class function seems to refer to currying or what?)
No, constructing closures, and passing them around as values (currying
is merely a particularly convenient special case of this).
> (Did you miss a "polymorphic" before function? That would explain it.
I don't understand what you mean. Polymorphism is about typing. Late
binding is not dependent on typing (there are untyped OO languages, for
[Followups to Haskell Cafe]
Andreas Rossberg, rossberg at ps.uni-sb.de
Let's get rid of those possible thingies! -- TB
More information about the Haskell