c#10 adds static abstracts to interface. in kotli...
# language-evolution
h
c#10 adds static abstracts to interface. in kotlin that would be like declaring functions or members in an interface that implementing classes must define in their companion object. that's a pretty cool feature for writing mathematical libraries or DSLs, imo. it's runtime, however, so I expect JB is not keen to add something like that to kotlin. i'd always considered kotlin to be a feature superset of c#, but as of a few version ago, that's not the case.
i
We can discuss it in conjunction with #mathematics.
e
any good link about that feature on C#?
h
i learned about it from nick chapas' youtube channel, but microsoft has industry leading documentation
h
This came up several times in context of typeclasses (and other) keep. Idk about the other c# features states like local extensions but kotlin has them - with context receivers, extensions for a type (Not an instance) can be encoded in a seperate instance and this can be used as context parameter. The only downside is that it has to be provided at the callsite because the implicit resultion is (currently?) Not wanted by most people. I cant find any info about how it was implemented in c#, they probably have the exact same problem regarding passing an additional instance vs resolving with reflection.