Khanh Nguyen Khanh Nguyen - 1 year ago 87
Swift Question

Does Swift support reflection?

Does Swift supports reflection, e.g. is the something like

with Swift objects? Actually does it even have a dynamic type system, something like
in Objective-C?

Answer Source

Looks like there's the start of some reflection support:

class Fruit {
    var name="Apple"

reflect(Fruit()).count         // 1
reflect(Fruit())[0].0          // "name"
reflect(Fruit())[0].1.summary  // "Apple"

From mchambers gist, here:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download