David Herman
01/03/2024, 5:26 AMJiaxiang
01/03/2024, 8:55 PMDavid Herman
01/03/2024, 9:04 PMA : B<String, Int>
, given A
, how do I know that it implements B
with generic types specified as String
and Int
I'm sure getting generic type information out of other things, like a top level function or property, could be useful.
If no one else agrees with me, then maybe it's not necessary. But I was also hoping that others might chime in with their own interesting cases.David Herman
01/03/2024, 9:06 PMKSClassDeclaration.asStarProjectedType()
might be interesting.Jiaxiang
01/03/2024, 9:07 PMDavid Herman
01/03/2024, 9:07 PMDavid Herman
01/03/2024, 9:08 PMJiaxiang
01/03/2024, 9:09 PMDavid Herman
01/03/2024, 9:09 PMresolve
too much, but I feel like most times I have to? So when I see it used in the examples I'm happy, it means I'm not crazy to use it. But I do worry that I might start overusing resolve
when there were non-resolve ways to handle it.David Herman
01/03/2024, 9:10 PMJiaxiang
01/03/2024, 9:10 PMresolve
is recommended to avoid, but when you have to, just feel no pressure to use it.David Herman
01/03/2024, 9:11 PMDavid Herman
01/03/2024, 9:11 PMJiaxiang
01/03/2024, 9:12 PMresolve
can be replaced with a non resolve solution, the scenario you just mentioned happen to be one but I don’t think it is worth it to do given the potential deep recursive stack we have to go through, if I were you and if I were not in a situation where I must squeeze all performance gains, I would just go with a resolved situation.David Herman
01/03/2024, 9:16 PMKSClassDeclaration
, KSTypeReference
etc.), put them into a spreadsheet (so first column has KSClassDeclaration::classKind
, KSClassDeclaration::asStarProjectedType
, KSTypeReference::element
, etc.), and then put a check in the second column for what shows up in the examples.
I don't think examples have to be exhaustive by any means, but maybe this will highlight some of the methods and properties that you think should be served by an example, at which point you can try to create a realistic use-case that demonstrates them.David Herman
01/03/2024, 9:16 PM