Just another example of missing string interpolation
bachmeier
no at spam.net
Fri Oct 13 17:38:23 UTC 2023
On Friday, 13 October 2023 at 15:34:59 UTC, kdevel wrote:
> Your functions `foo` and `bar` both not only make calls to
> `interp` but they
> also necessarily contain, in order to succeed, the name of the
> variable.
Yes
> Your approach creates more dependencies between unrelated
> components than necessary.
Then don't use it? The goal of programming is to get the right
output.
> How do you unittest `foo` and `bar`?
The same as any other function.
> The dependencies can easily be avoided if `foo` and `bar` only
> returned the value of the computation, the results are stored
> in the AA given as `subs` in the call to `interp`.
I prefer less complicated code to code that imposes arbitrary
restrictions.
More information about the Digitalmars-d
mailing list