I try:
This#.pod
but this always return sys::.
sys::
p := Pod.of(this)
should do the trick.
Can also do typeof.pod
typeof.pod
How to get this pod in static context?
Typical trick is to just do something like this:
class Foo { static Pod x() { Foo#.pod } }
There is currently no such thing as a "containing class" type literal (although it has been discussed).
If rename the class, we need edit all reference in static context.
Maybe This#.pod is a good idea.
-1 to This#.pod returning current pod
First of all, it doesn't help while renaming because you still have to rename references in other classes.
How can it work, anyway:
This#
How about this:: as this pod literal?
this::
Login or Signup to reply.
Akcelisto Thu 6 Jan 2011
I try:
but this always return
sys::
.katox Thu 6 Jan 2011
should do the trick.
andy Thu 6 Jan 2011
Can also do
typeof.pod
Akcelisto Thu 6 Jan 2011
How to get this pod in static context?
brian Thu 6 Jan 2011
Typical trick is to just do something like this:
There is currently no such thing as a "containing class" type literal (although it has been discussed).
go4 Sun 9 Jan 2011
If rename the class, we need edit all reference in static context.
Maybe
This#.pod
is a good idea.vkuzkokov Thu 13 Jan 2011
-1 to
This#.pod
returning current podFirst of all, it doesn't help while renaming because you still have to rename references in other classes.
How can it work, anyway:
This#
yields different instances in different contexts.This#.pod
yields different values depending on context.Akcelisto Thu 13 Jan 2011
How about
this::
as this pod literal?