Scala underscores in names -
I have read many style guidelines and other resources, stating that using the underscores in method / variable / other names There is a bad idea for I
What are the technical reasons behind this?
I am very sad to prepare helpful tasks with _Also there are such things that should be private, which I want to make public so that I can access them through REPL. It is difficult to use other naming conventions like "accessory" suffix.
Any thoughts will be appreciated!
Wildcard operator is used heavily in is misleading. You have to be careful to see if underscore is prepaid or not. However, the internal underscore is difficult to confuse: _ scala therefore:
xs map (_.x) // Call the x method of each element x-map (_x) pass each element through the _x method
xs map (my_method) // There is no such form where _ stands for element of the list So these are less problematic, but at least still holding the eye slightly while looking for someone to shut down is probably the reason that They are frustrated, but to be honest, I use them all the time, especially in those things where the Intex Df and Ntrik variables are where more or no risk to see them interface.
Comments
Post a Comment