Search code examples
javascriptdocumentationinstance-methods

Referring to javascript instance methods with a pound/hash sign


This question is similar to Why are methods in Ruby documentation preceded by a hash 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 proper for me to refer to instance methods in comments/documentation as SomeClass#someMethod? Or should my documentation refer to ``SomeClass.someMethod`?


Solution

  • I think it comes from javadoc.

    http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#{@link}