Hacker News new | ask | show | jobs
by rallyaround 1535 days ago
>you can't pass a dependency to its dependent until the dependency has been constructed. > But it may have its own dependencies. So now there is a topological sorting problem.

I guess I just don't see the problem.

That solves itself naturally through normal programming. Some function takes A as argument? Well I obviously make that A first. A requires B to setup? Well obviously I make that first.

I don't need to "sort" anything, it just follows naturally from the types and constraints of the API.

2 comments

Best part is you haven't introduced new constructs or DSLs or XML configuration. It's just plain old Python functions calling other functions.
Yes you're right, it works really really well.