[Issue 2698] Syntax to parse an identifier from a string, instead of mixin()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 16 03:58:26 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=2698

--- Comment #6 from Mathias LANG <pro.mathias.lang at gmail.com> ---
Nick:

A couple years ago, at DConf if memory serves me well, the usage of Bugzilla
was discussed and it was mentioned that more enhancement requests should go to
the DIP queue.
I unfortunately don't remember the precise conversation, so I'll try to add
more details of my interpretation:

- Bugzilla should contain actionable item: if an item cannot be picked up by
someone and acted on, it shouldn't be here.
- Bugzilla should contain low-controversy items: if an item is controversial it
is hardly a bug, but most likely an unintuitive behavior (e.g. `if (array)`).
- Bugzilla items should describe problems, not solutions: as the former is a
bug report and the later is a proposal. It does not mean that bug report are
not free to suggest any solution they see fit, but they should focus on the
issue.

Essentially, this ensures that issues *can be closed*.

This report IMO falls into the last category: it describes a situation and
derive two use cases from it. The first use case, calling a C function which is
not a valid D identifier, is covered (in what I would say a superior way) by
`pragma(mangle)`.
The second use case is also interesting, but would need a complete, structured
proposal to be evaluated. For example, this issue was created at a time when
`format` was most likely not CTFE-able. I'm fairly certain `q{}` did not exist
either. Nowadays code generation is much simpler (while still far from
perfect), and we should assess whether or not this enhancement still make
sense. In any case, it would be an improvement over the current state of
things, and would not allow to do anything that we can't do currently.

I hope this is clear enough. If you disagree with that reasoning, feel free to
continue the discussion and/or to re-open.

--


More information about the Digitalmars-d-bugs mailing list