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

Re: dynamic vs. static typing





> Joe Marshall wrote:
>>
>> Er, yes, but whether an object is identical to itself isn't usually
>> considered a property or interface of the object.

"Anton van Straaten" <anton@appsolutions.com> writes:
> Then I'd argue that those doing the "usual considering" are missing
> something important.  The fact is, equality is an operation on values, which
> makes it part of the interface to those values.  Many languages recognize
> this explicitly, because they have to, to get their semantics right.
> Haskell, C++, and Smalltalk all explicitly define equality as part of the
> interface of a type or class.

*some* `kinds of equality' are certainly part of the interface, but
intensional identity is generally an axiom of logic.  The language may
not give you access to the concept and make you define your own
isomorphic version (like defining Monday == Monday), but that's a bug
in the language design.

> So this is all an argument in favor of easy to use
> parameterized types.  :)

Yes.