proposal: a new string litteral to embed variables in a string
Dmitry Olshansky
dmitry.olsh at gmail.com
Wed Nov 6 12:43:54 PST 2013
07-Nov-2013 00:24, Timothee Cour пишет:
>
>
>
> On Wed, Nov 6, 2013 at 10:49 AM, Dmitry Olshansky <dmitry.olsh at gmail.com
> <mailto:dmitry.olsh at gmail.com>> wrote:
>
> 06-Nov-2013 21:40, Manu пишет:
>
> On 7 November 2013 03:14, Dmitry Olshansky
> <dmitry.olsh at gmail.com <mailto:dmitry.olsh at gmail.com>
> <mailto:dmitry.olsh at gmail.com <mailto:dmitry.olsh at gmail.com>>__>
> wrote:
>
> 06-Nov-2013 15:45, Dicebot пишет:
>
> Reasonable proposal but I have not encountered much
> need in this
> functionality personally (std.string.format worked just
> fine)
> and thus
> can't really evaluate how justified such addition may be.
>
>
> +1
>
> Since formatting/templates became accessible in CTFE I do
> not see
> much need for this.
>
>
> Every time I use a q{} block, it's to embed some code in a different
> language. I would like the IDE to syntax hilight properly if able.
> HLSL/GLSL, JSON, XML are the most common embedded languages I
> encounter.
>
[snip]
> All in all it's hardly a good thing to trade a language feature
> *only* to help people give "hints" to IDEs (which they may as well
> ignore).
>
>
> the proposal in the OT is not about syntax highlight hints, it's about
> embedding variables in string literals.
AFAICT there is no universal thing (literal syntax) that mix well into
every DSL. On this fact alone I'd rather use a natural template engine
for the DSL in question. That and fact that it's a whole new feature
with its pitfalls is enough for me to at least postpone it.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list