[plt-scheme] (typeof obj)

From: Jos Koot (jos.koot at telefonica.net)
Date: Mon Jun 11 10:17:27 EDT 2007

It appears to me that there is even no agreement about what the type of a type 
would have to be, let alone the question when two types are the same ;) Please 
take notice that (as a fan of PLT) I am quite content with PLT's system of 
predicates, those for structs and object-classes included.
Jos Koot

----- Original Message ----- 
From: "Robby Findler" <robby at cs.uchicago.edu>
To: "Shriram Krishnamurthi" <sk at cs.brown.edu>
Cc: "PLT Scheme List" <plt-scheme at list.cs.brown.edu>
Sent: Monday, June 11, 2007 3:49 PM
Subject: Re: [plt-scheme] (typeof obj)


> But name equality isn't type equality for structs (or am I missing
> something? we're being pretty terse :)
>
> On 6/11/07, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
>> Counter-counter: name-equality =/=> type-equality for structs.
>>
>> On 6/11/07, Robby Findler <robby at cs.uchicago.edu> wrote:
>> > On 6/11/07, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
>> > > I assume you mean 'procedure (-:.
>> > >
>> > > So you don't really want the type at all: you just want the run-time
>> > > tag on a value.  (That's what *you* want -- is that what the OP
>> > > wants?)  I don't find that very useful.  What you want you can write
>> > > just as well in Scheme:
>> > >
>> > > (define (run-time-tag-of v)
>> > >   (cond
>> > >     [(number? v) 'number]
>> > >     [(string? v) 'string]
>> > >     ...
>> > >     [(procedure? v) 'procedure]))
>> > >
>> > > Fill in the ... lines (about ten of them), and make a SRFI -- done!
>> > >
>> > > Shriram
>> > >
>> > > PS: I can guess the counter-argument you will give.
>> >
>> > Structs?
>> >
>> > > I have my
>> > >     counter-counter-argment ready. <-;
>> > > _________________________________________________
>> > >   For list-related administrative tasks:
>> > >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>> > >
>> >
>>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 



Posted on the users mailing list.