On Sat 13 Mar 2021 at 19:09, Alexander Burger <a...@software-lab.de> wrote:
> On Sat, Mar 13, 2021 at 06:48:22PM +0100, Tomas Hlavaty wrote:
>>    (de <div> (Col . Prg)
>>       (prin "<div class=\"" Col "\">")
>>       (run Prg)
>>       (prin "</div>") )
>> 
>> prin has side-effect.
>
> Nonsense! 'prin' *is* the only and desired effect.

see https://en.wikipedia.org/wiki/Side_effect_(computer_science)
for explanation what side-effect means

>> Col is not properly escaped!
>
> How so? It generates
>
>    <div class="red">
>
> What kind if escape do you want?

(<div> "\">") -> <div class="">"></div>

which is invalid html.

>> So will I see the generated html in stderr?
>
> Sigh! Please think a little. I said the output goes to the current stream and
> debug info to stderr. Good old Unix style.

Exactly, so debug info will not show me the generated html which means
trace does not show me what I need.  Trace is useful for pure functions.
Trace is less useful for functions with side-effects because those
side-effects are not captured by trace.

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to