Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Capability Safe Reflection for the Wyvern Language, Esther Wang

Meta Workshop
October 30, 2016

Capability Safe Reflection for the Wyvern Language, Esther Wang

Meta Workshop

October 30, 2016
Tweet

More Decks by Meta Workshop

Other Decks in Research

Transcript

  1. type List = def append[T](object:T) : Unit def get[T](index:Integer) :

    T def make[T]() : List = new /* ... Object definition ... */ val myList : List = make[Integer]()
  2. val listObj:Object = \ reflect[List](List.make[Integer]().add(1)) val listType:Type = listObj.typeOf() val

    getMethod:Method = listType.methodByName(“get”) listObj.invoke(getMethod, List.make().add(0))