Le 21/04/2022 à 12:58, David Kastrup a écrit :
My personal take on this would move the magic out of the normal reach of
users.  You get (*start-column*) and (*end-column*) which you can use
for accessing the respective fluids but the function *start-column* does
not merely access %start-column but it also registers the associated
impurity for the sake of caching.


Absolutely, I don't want to make the fluids accessible to
anything outside of the property infrastructure. *start-column*
(or whatever name) is an Assumption object. Assumption is
a smob type defining a call () smob procedure. That way, you
can have

(*start-column*)

and

(under-assumptions ((*start-column* 0))
  ...)

and both of these use the fluid as well as other internal members
of the assumption without ever making them accessible. For the
latter, the under-assumptions macro invocation translates to

(ly:run-under-assumption *start-column* 0 (lambda () ...))

which makes the interface completely opaque/encapsulated.


Reply via email to