Improving assert-printing in DMD

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 26 12:34:18 PDT 2015


On Monday, 26 October 2015 at 17:50:13 UTC, Nordlöw wrote:
> On Monday, 26 October 2015 at 17:36:37 UTC, Nordlöw wrote:
>> On Monday, 26 October 2015 at 15:17:37 UTC, Atila Neves wrote:
>>> [...]
>>
>> Yes, that's my plan.
>>
>>> [...]
>
> I haven't thought about that in detail. One way would be to 
> have a default implementation in druntime, say in `core.assert` 
> that triggers pretty pretting when imported. For this work in a 
> convenient way, it could be convenient to move logic from 
> std.conv to, say, `core.conv`. `core.assert` could then import 
> `core.conv` in order to reuse toString-conversion logic for, 
> say, builtin types and types that have the member `string 
> toString`.
>
> Maybe we need to propose a set of alternatives and do a vote 
> about how to solve this.

I think druntime should at least be mentioned in the DIP.

Atila


More information about the Digitalmars-d mailing list