Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 18, 2020 give static assert the pragma(msg,...) changes | ||||
---|---|---|---|---|
| ||||
Continuing in the vein of making error messages nicer: Is there any reason that static assert, which deals with compile time messages, doesn't function the same way as pragma(msg,...), which also deals with compile time messages, w.r.t multiple arguments to the string that can be anything including types? It just occurred to me that there is a lot of string concatenation and `.stringof` use. |
September 18, 2020 Re: give static assert the pragma(msg,...) changes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nicholas Wilson Attachments:
| On Fri, Sep 18, 2020 at 10:15 AM Nicholas Wilson via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> Continuing in the vein of making error messages nicer:
>
> Is there any reason that static assert, which deals with compile time messages, doesn't function the same way as pragma(msg,...), which also deals with compile time messages, w.r.t multiple arguments to the string that can be anything including types?
>
> It just occurred to me that there is a lot of string concatenation and `.stringof` use.
🤯
This is SO obvious! I've always wanted this, I just never knew it!
|
September 18, 2020 Re: give static assert the pragma(msg,...) changes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | On Friday, 18 September 2020 at 04:25:44 UTC, Manu wrote: > 🤯 > > This is SO obvious! I've always wanted this, I just never knew it! Haha. Heres an initial implementation for you: https://github.com/dlang/dmd/pull/11757 |
September 20, 2020 Re: give static assert the pragma(msg,...) changes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nicholas Wilson Attachments:
| On Fri, Sep 18, 2020 at 8:05 PM Nicholas Wilson via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> On Friday, 18 September 2020 at 04:25:44 UTC, Manu wrote:
> > 🤯
> >
> > This is SO obvious! I've always wanted this, I just never knew it!
>
> Haha. Heres an initial implementation for you: https://github.com/dlang/dmd/pull/11757
Nice work!
Let's have babies! I'm available any time...
|
Copyright © 1999-2021 by the D Language Foundation