A critic of Guido's blog on Python's lambda

Ken Tilton kentilton at gmail.com
Wed May 10 12:13:25 EDT 2006



Chris F Clark wrote:
> David C Ullrich asked:
> 
>>Q: How do we ensure there are no loops in the dependencies?
>>
>>Do we actually run the whole graph through some algorithm
>>to verify there are no loops?
> 
> 
> The question you are asking is the dependency graph a "directed
> acyclic graph" (commonly called a DAG)?  One algorithm to determine if
> it is, is called "topological sort".  That algorithm tells you where
> there are cyclces in your graph,

Yep. But with Cells the dependency graph is just a shifting record of 
who asked who, shifting because all of a sudden some outlier data will 
enter the system and a rule will branch to code for the first time, and 
suddenly "depend on" on some new other cell (new as in never before used 
by this cell). This is not subject to static analysis because, in fact, 
lexically everyone can get to everything else, what with closures, 
first-class functions, runtime branching we cannot predict... fuggedaboutit.

So we cannot say, OK, here is "the graph" of our application model. All 
we can do is let her rip and cross our fingers. :)

kenny



More information about the Python-list mailing list