5 ms·
Reflection is not "unfortunate". Actually, it is quite helpful when used right. And there is a way to shove it with AOT. I've tried to communicate that to some
by garganzol 6y ago
Reflection is not "unfortunate". Actually, it is quite helpful when used right. And there is a way to shove it with AOT.
I've tried to communicate that to some team members but got the impression they weren't so interested in solving that. Or maybe they are reluctant to take a solution from 3rd party, preferring to quickly come up with in-house code instead.
Well, this would clearly cost them at least 5 years of R&D given they are able to find the right PhDs in math and compiler theory who are able to crack that.
As for source code generators as a way to solve the reflection dilemma: they are not going to make a dent as they tied to the specific language (C#), and not to .NET platform as a whole. This makes them somewhat fragile and largely fragmented in the eyes of component vendors.
- jmarolf 6y ago> As for source code generators as a way to solve the reflection dilemma: they are not going to make a dent as they tied to the specific language (C#), and not to .NET platform as a whole. Slight correction: source generators are a _compiler_ feature not a _language_ feature. This may seem like a meaningless distinction, but you can use source generators in _any_ C# project provided your compiler is new enough. You can easily use generators in a .NET 3.5/C# 5 project if you want.