codon icon indicating copy to clipboard operation
codon copied to clipboard

What is the difference between the support for reflection in Codon and Python?

Open WutingjiaX opened this issue 1 year ago • 1 comments

I did not see any relevant search instructions in the document. Can someone give me some guidance?

WutingjiaX avatar Feb 28 '24 08:02 WutingjiaX

I have another question, when will there be more than one occurrence in RecordType:: flatten(). I see such comments in the relevant code:

/**
 * A static integer type (e.g. N in def foo[N: int]). Usually an integer, but
 * can point to a static expression.
 */

but I don't quite understand this scenario. Can you give a specific example?

WutingjiaX avatar Mar 05 '24 06:03 WutingjiaX

Codon has no reflection whatsoever (well, there is limited RTTI info for polymorphic classes, but it is not exposed).

flatten is there to support cases such as Tuple[5, int] which expands to Tuple[int,int,int,int,int]. It is not pretty and will be removed in the next versions.

inumanag avatar Sep 23 '24 05:09 inumanag