Should I use, this, self or something else for sel

2020-02-12 14:07发布

问题:

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?

回答1:

In addition to "this", "self", and "x", I have also seen "__" and "lowercaseenclosingclassname".



回答2:

In many examples I've seen people are using just x. In my own code started with this, but now I usually do x, because IMHO it makes the code somewhat more readable



标签: oop f#