Is there any writeln like functions without GC?
bauss
jj_1337 at live.dk
Mon Nov 11 16:20:59 UTC 2019
On Saturday, 9 November 2019 at 22:03:03 UTC, Ferhat Kurtulmuş
wrote:
> On Thursday, 31 October 2019 at 03:56:56 UTC, lili wrote:
>> Hi:
>> why writeln need GC?
>
> Upon this post, I thought writing a gc-free writeln would be a
> good learning practice. Although it is not a feature-complete
> one, it was a lot of fun to do it :)
>
> https://github.com/aferust/stringnogc
If you wanted to follow the standard of D then you didn't need a
string type. Since it doesn't really exist in D.
string is just an alias for immutable(char)[]
So what you want is to use this:
https://dlang.org/phobos/std_container_array.html
More information about the Digitalmars-d-learn
mailing list