What's the point in skipping whitespace around Ruby's exponent operator?

I'm just wondering what are the reasons for excluding whitespace around Ruby's expansion operator. The community-based Ruby Coding Style Guide says that operators other than the exponent ( **

) operator should use spaces, i.e.

# bad
e = M * c ** 2

# good
e = M * c**2

      

I was unable to find any information on this matter.

+3
ruby


source to share


1 answer


Perhaps to reflect a handwritten way of expressing that the exponent operator has high precedence over the member associated with:

Written:

  • M xc 2


code:

  • M * c**2

0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics