
How Swift’s Mirror Works - ingve
https://swift.org/blog/how-mirror-works/
======
maccio92
C#'s implementation is much more impressive, through the reflection libraries,
doesn't require unsafe code, is not a hidden implementation deal, and has a
much cleaner interface. Also look into expressions and the awesome things you
can do with the framework. Yeah yeah blah blah Microsoft, but that was the
company of the past. New leadership has been focused on better things, open
sourcing the Roslyn compiler and dotnet core. The c# of 2018 is a brand new
beast

~~~
nielsbot
What do you mean? Swift `Mirror` doesn't require unsafe code and is not a
hidden implementation detail.

~~~
coldtea
> _Swift `Mirror` doesn 't require unsafe code and is not a hidden
> implementation detail._

Actually part of the code is C++, so that would be in the unsafe side.

Also they explicitly say that the internals of Mirror are all based on
implementation details that might change.

~~~
nielsbot
But that's not visible to the clients of `Mirror` API. Inside Swift `Mirror`
is just another high-level API.

