Re: Entity and Identity
Date: 10 Aug 2009 21:31:09 GMT
>On Aug 8, 12:31 am, rp_at_raampje.(none) (Reinier Post) wrote:
>> Nilone wrote:
>> >Types define values. Values aren't mutable, since mutability implies
>> >a persistent identity beyond the value itself. As soon as you have
>> >mutability, you have a state machine, and subtyping state machines is
>> >a problem. Subtyping an interface and creating a new state machine
>> >for it is fine.
What you're describing I might call 'abstract data type' but not just 'type'.
>> You are using the term 'type' in a different sense than OO languages
>> such as Java and C# do.
>That's not surprising. Most OO documentation and tutorials use the
>term to indicate arbitrary classification or similarity.
You're reading different documentation and tutorials than I have seen. I don't think I've ever seen the term 'type' used in that way. Aren't you referring to 'class'?
> I use the
>term to indicate a domain of values with defined semantics, and to the
>construction of such a domain in a programming language. I'll stand
>by my definition until I see a better one.
Try Luca Cardelli's:
>> But what if you need equivalent, but differently implemented functions?
>> That's what polymorphism is for.
>Take a look at my other post. I believe the type system I described
>there is properly polymorphic. If you give an example, I'll describe
>it in terms of that system.
-- ReinierReceived on Mon Aug 10 2009 - 16:31:09 CDT