Refering to javascript instance methods with a pound/hash sign
Posted
by Josh
on Stack Overflow
See other posts from Stack Overflow
or by Josh
Published on 2010-04-06T20:07:11Z
Indexed on
2010/04/06
20:43 UTC
Read the original article
Hit count: 389
This question is similar to http://stackoverflow.com/questions/736120/why-are-methods-in-ruby-documentation-preceded-by-a-pound-sign
I understand why in Ruby instance methods are proceeded with a pound sign, helping to differentiate talking about SomeClass#someMethod
from SomeObject.someMethod
and allowing rdoc
to work. And I understand that the authors of PrototypeJS admire Ruby (with good reason) and so they use the hash mark convention in their documentation.
My question is: is this a standard practice amongst JavaScript developers or is it just Prototype developers who do this?
Asked another way, is it proepr for me to refer to instance methods in comments/documentation as SomeClass#someMethod
? Or should my documentation refer to `SomeClass.someMethod
?
© Stack Overflow or respective owner