Feedback on Streams concept, similar to Ranges

Andrew andrewlalisofficial at gmail.com
Wed May 17 15:51:11 UTC 2023


On Wednesday, 17 May 2023 at 14:53:04 UTC, monkyyy wrote:
> What does duck typing have to do with nogc?

Nothing; duck typing just results in code that's harder to read, 
and harder to reason about than restrictive code, usually.

> If you said `writeToStream(T)(T items)` and assumed the user 
> would provide a T that defined opSlice, opIndex and a length 
> why couldnt whatever systems have nogc somewhere in the 
> pipeline that makes it werk

I don't understand what you're trying to say here. Yes, the 
intention is that my library is @nogc compatible by default, and 
anyone can choose to make a stream that is or isn't @nogc 
compatible, and it'll work with the library.




More information about the Digitalmars-d mailing list