Am Mo., 7. Juni 2021 um 20:55 Uhr schrieb Wolfgang Corcoran-Mathe <
[email protected]>:

>
> While this is clearly the Right Thing, it is clumsy to have to
> compose every constructor with transient->persistent, as you'll
> have to do if you aren't intending to use any of the -! forms:
>
>     (cons 0 (transient->persistent (list 1 2)))
>
> This kind of mandatory verbosity often triggers distaste and even
> hostility from some programmers.  It is especially onerous in the
> context of implementations which don't provide any linear-update
> variant procedures, where the distinction between transient and
> persistent data is empty.
>

PS I would like to compare this again with the const qualifier of the C and
C++ languages (with their respective semantics). There may be some
programmers that are annoyed with compiler warnings when constness is not
properly cast, but the majority isn't (I hope!) and instead makes sure that
their programs are logically correct and make sure that every single cast
makes sense. (And for the latter, it is important that the casts are
explicit).

(NB: Of course, the const qualifier in C is not without problems, often due
to historical baggage, but this is a question of good API design and not
its general usefulness.)

Reply via email to