On Wednesday, 14 March 2018 at 15:50:13 UTC, Jonathan Marler
wrote:
I've got a PR for dmd (https://github.com/dlang/dmd/pull/7988)
that implements "interpolated strings" which makes generating
code with strings MUCH nicer, i.e.
Really nice. :thumbs-up:
On Wednesday, 14 March 2018 at 15:50:13 UTC, Jonathan Marler
wrote:
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote:
[...]
I've got a PR for dmd (https://github.com/dlang/dmd/pull/7988)
that implements "interpolated strings" which makes generating
code with strings MUCH nicer, i.e.
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote:
I hate building code strings for string mixins as it's very
ugly and seems like a complete hack.
How bout, instead, we have a special code string similar to a
multiline string that allows us to represent valid D code. The
compiler can
On 2017-03-15 13:50:28 +, Inquie said:
I hate building code strings for string mixins as it's very ugly and
seems like a complete hack.
...
Even a bit old, I would like to pick-up this topic, as I totally agree
with the statement.
Thinking this a bit further, it would be very nice to h
On 03/15/2017 11:50 AM, Stefan Koch wrote:
Wish I could get rid of the need for "mixin(...)" in interp though.
But you can.
in interp you can evoke the function you generate however for that you
need to pass s to it.
Thus reinventing writef and defeating the whole point of interpolated
stri
On Wed, Mar 15, 2017 at 01:50:28PM +, Inquie via Digitalmars-d wrote:
> I hate building code strings for string mixins as it's very ugly and seems
> like a complete hack.
>
> How bout, instead, we have a special code string similar to a multiline
> string that allows us to represent valid D co
On Wednesday, 15 March 2017 at 15:39:38 UTC, Nick Sabalausky
(Abscissa) wrote:
On 03/15/2017 09:50 AM, Inquie wrote:
e.g.,
string s = "smile";
enum code1 = @#
void happyCode = "Makes me @@s@@";
#@
enum code2 = code1 ~ @#
int ImThisHappy = @@s.length@@;
#@
mixin(code);
import scriptlike; /
On 03/15/2017 09:50 AM, Inquie wrote:
e.g.,
string s = "smile";
enum code1 = @#
void happyCode = "Makes me @@s@@";
#@
enum code2 = code1 ~ @#
int ImThisHappy = @@s.length@@;
#@
mixin(code);
import scriptlike; // https://github.com/Abscissa/scriptlike
string s = "smile";
// http://semitwi
On Wednesday, 15 March 2017 at 14:12:57 UTC, Adam D. Ruppe wrote:
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote:
I hate building code strings for string mixins as it's very
ugly and seems like a complete hack.
Me too, that's why I avoid doing it.
Check out my tips of the week here
On 15/03/17 15:50, Inquie wrote:
I hate building code strings for string mixins as it's very ugly and
seems like a complete hack.
What I usually do is use the q{} format. Vim does syntax highlighting on it:
string code = q{
immutable int a = %s;
}.format(something);
...
mixin(
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote:
I hate building code strings for string mixins as it's very
ugly and seems like a complete hack.
Me too, that's why I avoid doing it.
Check out my tips of the week here:
http://arsdnet.net/this-week-in-d/sep-20.html
and here:
http://a
On Wednesday, 15 March 2017 at 13:50:28 UTC, Inquie wrote:
I hate building code strings for string mixins as it's very
ugly and seems like a complete hack.
How bout, instead, we have a special code string similar to a
multiline string that allows us to represent valid D code. The
compiler can
I hate building code strings for string mixins as it's very ugly
and seems like a complete hack.
How bout, instead, we have a special code string similar to a
multiline string that allows us to represent valid D code. The
compiler can then verify the string after compilation to make
sure it i
13 matches
Mail list logo