On Apr 13, 2013, at 08:24, u1204 wrote:
> One thing that is very useful is an answer to the question "Who calls
> function X?".
> ...
> This "inverse lookup" is especially useful for code factoring.


Indeed.  A developer working on a function X might want to know the
names of all other functions that call it.  Alternatively, it can be
useful to see examples of a function's usage, possibly in proximity
to other functions (eg, "Who calls functions X and Y").  


> A literate program using Latex can generate this.  By adding ...

Although it's possible to add annotations (in whatever format) to a
code header, this is problematic for several reasons.  Annotations:

-  require time and effort to research and add
-  introduce visual "noise" to the code base
-  may be erroneous, incomplete, outdated, etc.

So, it's better to limit annotations to things that a program (eg,
Codeq) can't determine.  For example, "This function uses Greeble's
algorithm to calculate the rotation of the lunar wainshaft".


Many useful annotations have to do with connascence:

  In software engineering, two components are connascent if a
  change in one would require the other to be modified in order
  to maintain the overall correctness of the system.

  -- http://en.wikipedia.org/wiki/Connascence_(computer_programming)

Jim Weirich has given some great talks on this topic, including:

  Grand Unified Theory of Software Design - Jim Weirich
  http://vimeo.com/10837903


Getting back to the immediate question, determining "who calls whom"
can be a problem in dynamic languages such as Clojure and Ruby.  So,
the programmer may need to provide hints.  Alternatively, it may be
possible to get this information by monitoring program operation in
a testing or limited production environment.

-r

 -- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     r...@cfcl.com
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Software system design, development, and documentation


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to