July 31, 2020
On Friday, 31 July 2020 at 13:01:37 UTC, Adam D. Ruppe wrote:
> On Friday, 31 July 2020 at 09:10:44 UTC, Chad Joan wrote:
>> Whenever this is used, it does abandon the original zero-allocation-conversion-to-string feature, but "toString" never had that to begin with (at least not in the general case; just for static strings and such).
>
> kinda a site node but be aware there are toString overloads that do offer this.
>
> see this for example: https://github.com/dlang/druntime/blob/master/src/object.d#L1995

That's good to know. Thanks for mentioning that!
July 31, 2020
On Friday, 31 July 2020 at 13:48:37 UTC, Paul Backus wrote:
> On Friday, 31 July 2020 at 09:10:44 UTC, Chad Joan wrote:
>>
>> I am considering putting a "stringize" method in my types, with a signature (by convention) like so:
>> @nogc nothrow void stringize(return scope StringVacuum writer) { ... }
>>
>
> Are you aware that toString already supports this kind of overload?
>
> The documentation for it is under `std.format.formatValue`, so it is a bit easy to miss:
>
> https://dlang.org/phobos/std_format.html#.formatValue

I was not. That's good to know. This one even accepts an OutputRange. Cool.

Thanks!
August 24, 2020
On Tuesday, 28 July 2020 at 05:34:59 UTC, Petar Kirov [ZombineDev] wrote:
> On Monday, 27 July 2020 at 21:08:52 UTC, Andrei Alexandrescu wrote:
>> [...]
>
> So the question is what do we do about the new traits proposed by [1]? How formal does the process needs to be about them? I see 3 options:
> 1. Traits or otherwise any language features part of a larger story (e.g. template parameter introspection, perfect forwarding) need to go through a 2 step DIP process:
>   1) A strategic/vision DIP that states the high-level problem that we want to solve. The goal of this DIP would be form community and leadership consensus on whether something is a strategic goal for D and whether we need to solve it.
>   2) A tactical DIP that proposes concrete language features and defines their semantics. In this case these would be the traits proposed by [1].
>
> [...]

I'd say new traits would be case-by-case. My gut feeling is that they're too small for a DIP, but I also understand why you'd ask if there would have to be one first.
1 2 3 4 5
Next ›   Last »