Sujet : Re: REPL in Lisp
De : jshem (at) *nospam* yaxenu.org (Julieta Shem)
Groupes : comp.lang.lispDate : 13. Jul 2024, 17:53:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87sewd1e68.fsf@yaxenu.org>
References : 1 2 3 4 5 6
Antonio Marques <
no_email@invalid.invalid> writes:
Julieta Shem <jshem@yaxenu.org> wrote:
[...]
(Couldn't I
``inject'' the ``dependencies'' by passing them all as arguments[?])
>
That's one way to do it. In languages that rely on 'objects' it's
fashionable to declare a field for each dependency, with an annotation that
says it's a dependency, and some framework will provide the values at run
time (there will be some framework-specific way to instantiate the
dependencies).
Got it.
I suppose ``packaging up'' would be appropriate if we pass in to a
procedure an object containing all the callbacks that you say.
Anyway, my interpretation of the Wikipedia article is merely
abstraction. Nothing but abstraction. I don't see why we need to call
it ``injection'' or even ``dependency'', even though the choice of words
isn't absurd.
>
Again, abstraction is just a requirement. There's few things in software
that don't imply some form of abstraction, so that word doesn't get us very
far.
Thanks. That makes perfect sense.
Dependency injection is all about the injection: someone provides your
dependencies for you, and what concrete implementations of those is
something that can and will vary.
It's very clear now. Thank you so much.