[racket] Typeof
I have a function which, at the moment, is performing manual dispatch:
(cond ((something1? e) (go-1 s))
((something2? e) (go-2 s))
(...))
Do you have any suggestions on how to avoid this manual dispatch?
José Lopes
On 04-04-2011 16:29, Shriram Krishnamurthi wrote:
>
> Approximate our reconstruct?
>
> --
> Pardon terseness and mistakes -- sent from phone.
>
> On Apr 4, 2011 11:24 AM, "Matthias Felleisen" <matthias at ccs.neu.edu
> <mailto:matthias at ccs.neu.edu>> wrote:
> >
> > Types are compile-time entities. They don't exist at run-time, so
> you can't query them at run-time.
> >
> > If you mean the type-tags of objects, we don't provide direct
> access. You can approximate it ...
> >
> > -- Matthias
> >
> >
> >
> >
> >
> >
> >
> > On Apr 4, 2011, at 11:18 AM, José Lopes wrote:
> >
> >> Hello,
> >>
> >> How do I query the type of an expression?
> >>
> >> Regards,
> >> José Lopes
> >>
> >> --
> >> José António Branquinho de Oliveira Lopes
> >> 58612 - MEIC-A
> >> jose.lopes at ist.utl.pt <mailto:jose.lopes at ist.utl.pt>
> >>
> >> _________________________________________________
> >> For list-related administrative tasks:
> >> http://lists.racket-lang.org/listinfo/users
> >
> >
> > _________________________________________________
> > For list-related administrative tasks:
> > http://lists.racket-lang.org/listinfo/users
--
José António Branquinho de Oliveira Lopes
58612 - MEIC-A
jose.lopes at ist.utl.pt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110404/f47fbca0/attachment.html>