What is direct parameter assignment useful for?

I've asked myself the same question. One possibility is that you can parameterize the setting in other places in the code, but that could be very brittle depending on how the parameter or even values derived from it are used in the code.

Another possibility could be that it's easier to write
(my-argument new-value)
than
(set! my-argument new-value).

On the other hand,
(define my-argument initial-value)
is easier to write than
(define my-argument (make-parameter initial-value))

I guess the actual answer has to come from the person who wrote the command-line example. :slight_smile:

1 Like