问题
I have been studying Akka Actors. I know the meaning of stop(ActorRef) which kills the running actor. But what is the difference between getSelf() and this.getSelf() while killing an actor? Thank You in advance!.
回答1:
There's no difference between them, it's just that some people believe it enhances readability.
Readability is an important thing in programming but in this specific case, I personally believe they are just as readable with or without the this
prefix.
来源:https://stackoverflow.com/questions/48974709/stopgetself-vs-stopthis-getself