我应该使用this,self还是其他类型作为类型定义中的self标识符? [英] Should I use, this, self or something else for self identifiers in type definitions?
本文介绍了我应该使用this,self还是其他类型作为类型定义中的self标识符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的猜测是,"this"更像C#,在F#中最好使用"self".
My guess is that "this" is more C#-ish and in F# it's better to use "self".
是否有任何必需的/首选的编码准则?
Are there any required/preferred coding guidelines?
推荐答案
除了"this","self"和"x"之外,我还看到了"__"和"lowercaseenclosingclassname".
In addition to "this", "self", and "x", I have also seen "__" and "lowercaseenclosingclassname".
这篇关于我应该使用this,self还是其他类型作为类型定义中的self标识符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文