Re:
by embedding-shape on Tuesday March 17, 2026 @04:16PM
(#47417723)
Both in the frontend and the backend, I've usually used "If it calls your code, it's a framework, if you call its code, it's a library", and would seem to fit here too. An argument parser you'd call from your main method, then do stuff with what it returns. In Crust, it seems you instead setup the command + what will happen when it's called, then let the framework call your code.
[ Parent
| on HN ]
Re:
by codybontecou on Tuesday March 17, 2026 @05:09PM
(#47418357)
That’s… actually a great definition. I’m going to try to retain that.
Re:
by jazzypants on Tuesday March 17, 2026 @10:06PM
(#47420824)
This is classically called "Inversion of Control"[0] or the "Hollywood Principle"[1] as in "Don't call us-- we'll call you".
[0] - https://martinfowler.com/bliki/InversionOfControl.html [1] - https://wiki.c2.com/?HollywoodPrinciple