[Swift-devel] Problem with iterate

Ben Clifford benc at hawaga.org.uk
Fri Feb 19 11:57:22 CST 2010


> I think we are on the same page, that if you cannot resolve the 
> dependencies, things just fall apart.

yes.

> The part I don't get, is why would you get a deadlock
> in this situation (which is where this whole discussion started from), as
> opposed to an error detecting that the DAG cannot be constructed? It seems
> that at the time of DAG construction (I assume this is the SwiftScript
> compilation stage), any failure to add nodes to the DAG due to unresolved
> dependencies should return an error and halt, rather than execute until the
> deadlock happens.

So if you feed in an invalid program (i.e. not a program) then the 
behaviour is undefined - the actually-implemented behaviour and the 
in-your-head behaviour are both "reasonable" interpretations of what would 
happen in if you feed in an invalid program. There's nothing in the 
(informal) definition of SwiftScript compelling either behaviour.

-- 




More information about the Swift-devel mailing list