Does Swift support reflection?

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:
https://gist.github.com/mchambers/fb9da554898dae3e54f2

Leave a Comment