[Issue 3821] writeln doesn't detect recursive data structures yet
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 29 13:56:04 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=3821
--- Comment #10 from berni44 <bugzilla at d-ecke.de> ---
(In reply to Steven Schveighoffer from comment #9)
> (In reply to bearophile_hugs from comment #0)
> > In Python the print is able to detect loops:
>
> Python is a managed language, and has the possibility of doing whatever it
> wants to the data types (i.e. it might be able to reserve a bit of data on
> each object for this purpose), D cannot do this.
IMHO it would be possible with D too (just instead of the reserve bit on each
object an additional list of allready printed items), but purity is blocking
this.
--
More information about the Digitalmars-d-bugs
mailing list