codon
codon copied to clipboard
What is the difference between the support for reflection in Codon and Python?
I did not see any relevant search instructions in the document. Can someone give me some guidance?
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?
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.