stop(getSelf()) vs stop(this.getSelf()) [duplicate]

不羁岁月 提交于 2019-12-11 04:18:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!