doc icon indicating copy to clipboard operation
doc copied to clipboard

user defined dynvars are invisible in sink

Open gfldex opened this issue 3 years ago • 2 comments

In https://docs.raku.org/language/contexts#Sink we do not mention that user defined dynvars, even when they are defined quite globally, will not show up in method sink. This can lead to had to track down bugs. It is unclear, if all dynvars that are defined in CORE will be visible in sink (read: I did test only $*ERR).

gfldex avatar Jun 26 '22 19:06 gfldex

I think that's because the .sink method is executed "outside" of the stack, just like phasers.

lizmat avatar Jun 26 '22 20:06 lizmat

the .sink method is executed "outside" of the stack, just like phasers.

Interesting. I didn't know that. Perhaps it would make sense to alias it to .SINK? And perhaps make the lowercase version spit out a deprecation warning in 6.e? And alter the doc to make it clear that declaring method SINK is preferred over method sink?

raiph avatar Jun 29 '22 14:06 raiph