In the tutorial, an iso
variable gets aliased as trn
:
fun test(a: Wombat iso) =>
var b: Wombat tag = a // Allowed!
But I am wondering what is the actual use case for getting an iso
variable, if you can't read from it?
Say, can I do something like this?
fun test(a: Wombat iso) =>
var b: Wombat tag = a // Allowed!
env.out.print(a.name())
Reference capabilities explains:
It means it's perfectly fine to read from iso reference.
You can test your example code in Pony sandbox and see for yourself.