Am Mittwoch, 13. Mai 2026, 09:44:58 Mitteleuropäische Sommerzeit schrieb Anton 
Ertl:
> On Tue, May 12, 2026 at 03:47:52PM +0200, Bernd Paysan wrote:
> > The cognitive burden of adding something to MARKER, and MARKER! is like 
this:
> > :is marker, ( -- )
> > :
> >   defers marker,
> >   my-value @ , ;
> > :
> > :is marker! ( addr1 -- addr2 )
> > :
> >   defers marker!
> >   @+ my-value ! ;
> > 
> > That's it. Maybe we can make it even easier by providing :chain <defered
> > word> that does the defers as first step, too.
> 
> In general I think that MARKER is not worth the effort we put into it
> (just finish the session and start it again), so I am not very
> sympathetic to the idea of adding more features to MARKER.
> 
> The usage above poses the question: does :IS add info to the previous
> marker that resets the redefined word to its previous action?
> Consider the usage
> 
> marker a
> marker b
> variable my-value \ why  is it called my-VALUE?
> 2 my-value !
> 
> :is marker, ( -- )
> 
>   defers marker,
>   my-value @ , ;
> 
> :is marker! ( addr1 -- addr2 )
> 
>   defers marker!
>   @+ my-value ! ;
> marker c
> 3 my-value !
> c
> b
> here 10000 erase
> a
> 
> When C is called, everything works as designed.
> 
> When B is called, unless :IS has an undoes action that happens first,
> the MARKER! action defined above is called, fetches a value that has
> not been stored, and stores into MY-VALUE which is just vanishing; it
> could be worse: the uninitialized value could be stored into some
> non-dead memory location.

:IS doesn't have that, but I added restoring the relevant vectors to the first 
part of MARKER!.

> When A is called, unless :IS has previously undone the change to
> MARKER!, A will try to execute a MARKER! definition that has probably
> been overwritten.
> 
> We probably can find a way to get this right, but as mentioned, I
> think we have already spent more time on MARKER than it is worth.

That's likely true.  We don't use marker except in tt.fs, where it's also 
superfluous.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to