Simple ADT-based "side-band" state?

Per some old LtU discussion and other implementations, there's interest in having some kind of side-band communication channel. The last post of the mentioned old LtU discussion asks: couldn't one just use an abstract data type? If the answer is "yes, that's a fine idea - but the syntax would get annoying because you would have to be creating all these containers to pass into function calls all the time, and then use getter methods inside the functions" then might an applications of macros, or implicit conversions, be a way to solve that usability issue?

It seems similar to just saying that all functions take optional arguments, but perhaps the two approaches have different consequences when it comes to typing?

(As you can probably tell, I haven't thought this through much, or hacked up any test code, so this line of thinking's value is perhaps fast approaching zero.)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

In Haskell, working with

In Haskell, working with families of monads and monad transformers rather than individual monads can go a long way here - you can just bolt on extra state. Doesn't help much if code wasn't monadic in the first place, of course.

Hilbert & Gentzen

Isn't flexibility in passing this "side-band" state one of the major usability differences between Hilbert-style deduction and Natural Deduction/LK/LJ? Or am I just missing how to demonstrate this problem in Natural Deduction?