[m-rev.] Re: construct__get_functor bug

Peter Ross pro at missioncriticalit.com
Mon Dec 23 23:31:54 AEDT 2002


fjh wrote:
> [From mercury-developers]
>
> On 19-Dec-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > I would like comments [...]
> ...
> > library/construct.m:
> > Add a new version of get_functor which takes a term of the
> > type we are trying to get the functor for.  This allows one to
> > handle functors with existentially quantified arguments.
>
> I don't really understand how this is supposed to work,
> i.e. what the purpose of the term is.
>
> What happens if you call get_functor with a functor number
> that doesn't match the functor in the term?
>
> Also, what happens if you call get_functor with a term
> whose type doesn't match the type_desc passed in?
> It is probably best to just use the type_info `TypeInfo_for_T',
> which gets implicitly passed to the C code, rather than
> passing a type_desc in.
>
This was just an implementation that I wrote to try and improve my
understanding of the RTTI sub-system.  All your criticisms are valid and I
think that some serious thought needs to placed into how to do this for
functors with existentially quantified arguments.  So I hereby consign this
patch to the dust-bin of history.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/13/2002

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list