skrawcz commented on issue #1268:
URL: https://github.com/apache/hamilton/issues/1268#issuecomment-2902862425

   > It really would be nice to be able to add one function at a time, that 
would allow for a more declarative approach using decorators to incorporate 
each function explicitly into the dag. the current module mechanism seems hacky 
to me.
   > 
   > dag = driver.Builder()
   > 
   > @dag.add_function
   > def A() -> int:
   >   ...
   > 
   > @dag.add_function
   > def B(A: int) -> float:
   >     ...
   > 
   > @dag.add_function
   > def C(A: int, B: float) -> float:
   >     ...
   
   @alex-janss it's all trade-offs. Hamilton was built for scale, think 1000s 
of functions; adding decorators to that is burdensome at that stage. Similarly 
if you want to reuse functions, you aren't coupled to the module they're in, 
like you would be in your example. But yes, we should enable an approach for 
folks to add functions; right now we're still migrating to the apache process...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to