On Thursday, 24 August 2017 at 11:57:59 UTC, Petar Kirov
[ZombineDev] wrote:
On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
All modern languages like Dart and C# have string
interpolation. Sharp example:
Console.WriteLine($"Hello {args[0]}!");
Who can summary is there any
On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
All modern languages like Dart and C# have string
interpolation. Sharp example:
Console.WriteLine($"Hello {args[0]}!");
Who can summary is there any objective reasons why it's not
realized in D?
Maybe you ought to read this entire
On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
All modern languages like Dart and C# have string
interpolation. Sharp example:
Console.WriteLine($"Hello {args[0]}!");
Who can summary is there any objective reasons why it's not
realized in D?
As Raymond Chen once said[1],
On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
All modern languages like Dart and C# have string
interpolation. Sharp example:
Console.WriteLine($"Hello {args[0]}!");
Who can summary is there any objective reasons why it's not
realized in D?
No one has submitted a DIP for that
All modern languages like Dart and C# have string interpolation.
Sharp example:
Console.WriteLine($"Hello {args[0]}!");
Who can summary is there any objective reasons why it's not
realized in D?
On Thursday, 20 April 2017 at 18:28:30 UTC, Atila Neves wrote:
On Monday, 17 April 2017 at 19:38:33 UTC, Kapps wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen
wrote:
[...]
C# got this feature recently. I didn't expect it to be a
significant difference, but I do find it a
On 04/21/2017 08:45 AM, Gary Willoughby wrote:
On Friday, 21 April 2017 at 12:32:01 UTC, Nick Sabalausky (Abscissa) wrote:
"Completely unnecessary" features like that are exactly what make D
worthwhile in the first place. Otherwise may as well stick to C++ or
Java.
Multiple ways of doing the
On Friday, 21 April 2017 at 12:45:39 UTC, Gary Willoughby wrote:
Go and Rust are both smashing D in popularity and user share,
maybe we could learn why that's the case.
Can't rely on RAII, can't rely on GC.
This is the single biggest problem to me.
GC performs slowly, and RAII is
then year? Which
argument is which?), and interpolated strings have the problem
of exposing variable names to the translators (who are probably
non-coders), potentially opening up the possibility of
arbitrary code execution via l10n strings.
This is machine checkable though, the translation
On Thursday, 20 April 2017 at 21:34:44 UTC, Steven Schveighoffer
wrote:
Dmitry's solution is superior I think:
$"{a} times 3 is {a * 3}"
->
AliasSeq!(a, " times 3 is ", a * 3)
+1, this is more flexible.
Would work fine with writeln.
Yep, and std.conv.text. We might want a function that
On Thursday, 20 April 2017 at 19:02:20 UTC, Kagamin wrote:
Also how various kinds of strings would work?
r$"{can}\i\has{slashes}"
$`same {here}`
r"" and `` are WysiwygStrings. Interpolation is not WYSIWYG.
$"" would need to support escaping of the interpolation start
character, so may as
On Friday, 21 April 2017 at 12:45:39 UTC, Gary Willoughby wrote:
Multiple ways of doing the same thing are not valuable or
progressive.
Go and Rust are both smashing D in popularity and user share,
maybe we could learn why that's the case.
Corporate backing and word-of-mouth?
I recall
Gary Willoughby wrote:
Go and Rust are both smashing D in popularity and user share, maybe we
could learn why that's the case.
'cause go backed by google, and rust backed by mozilla.
On Friday, 21 April 2017 at 12:32:01 UTC, Nick Sabalausky
(Abscissa) wrote:
"Completely unnecessary" features like that are exactly what
make D worthwhile in the first place. Otherwise may as well
stick to C++ or Java.
Multiple ways of doing the same thing are not valuable or
progressive.
On 04/21/2017 04:11 AM, Gary Willoughby wrote:
On Thursday, 20 April 2017 at 18:28:30 UTC, Atila Neves wrote:
I don't understand how
writeln($"{a} times 3 is {a * 3}");
is even marginally better than
writeln(a, " times 3 is ", a * 3); // look ma, works right now!
It's not even fewer
On Thursday, 20 April 2017 at 18:28:30 UTC, Atila Neves wrote:
I don't understand how
writeln($"{a} times 3 is {a * 3}");
is even marginally better than
writeln(a, " times 3 is ", a * 3); // look ma, works right now!
It's not even fewer characters.
Atila
This!
This is bloat that doesn't
10.3f", rec.id, rec.name, rec.amount);
writefln(" %20s %10s", rec.altName, rec.comment);
writefln(" %20s %6s", rec.address, rec.postalCode);
}
Meh, I'd argue that's just an example of why interpolated strings need
sup
On 4/18/17 4:50 AM, Walter Bright wrote:
On 4/15/2017 4:51 PM, cym13 wrote:
Removing imports is a good point, the first concrete one to be
mentionned. I'm
not sure it matters that much though as I think those imports are
generic enough
that I believe they would be imported anyway, but it's a
On Thu, Apr 20, 2017 at 03:32:18PM -0400, Nick Sabalausky (Abscissa) via
Digitalmars-d wrote:
[...]
> IMO, the only time a format string should be used instead of
> std.conv.text() or interpolated strings is when:
>
> 1. You're just rendering *one* value at a time with non-standard
s format string syntax was vastly better...for a format string,
anyway...)
IMO, the only time a format string should be used instead of
std.conv.text() or interpolated strings is when:
1. You're just rendering *one* value at a time with non-standard
formatting options (ie, left-/right-justified, l
Also how various kinds of strings would work?
r$"{can}\i\has{slashes}"
$`same {here}`
$q{{balanced}braces}
For templates it's straightforward.
On 04/20/2017 02:40 PM, Nick Sabalausky (Abscissa) wrote:
auto exho()
{
return writeln("${name} and this are app ${age*365*24} hours!");
}
Correction:
auto exho()
{
return writeln(
""~
_interp_text(name)~
" and this are app "~
On 04/20/2017 06:23 AM, Martin Tschierschke wrote:
and this not?
import scriptlike;
// with exho definition outside the scope of the used vars
auto exho(string x)(){return mixin("writeln("~interp!x~")");}
void main()
{
auto name = userInput!string("Please enter your name");
auto age =
On Thursday, 20 April 2017 at 18:28:30 UTC, Atila Neves wrote:
writeln($"{a} times 3 is {a * 3}");
is even marginally better than
writeln(a, " times 3 is ", a * 3); // look ma, works right now!
Matching up the correct commas and quotes is a bit of a pain in
the latter.
Though I don't
On Monday, 17 April 2017 at 19:38:33 UTC, Kapps wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
[...]
C# got this feature recently. I didn't expect it to be a
significant difference, but I do find it a substantial
improvement. Not only does it clearly show what goes
On 2017-04-19 03:45, Jon Degenhardt wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
I've been wanting to have support for interpolated strings in D for
some time now that will allow you to write e.g.:
[...]
One place I'd appreciate interpolated strings
On Thursday, 20 April 2017 at 10:23:30 UTC, Martin Tschierschke
wrote:
Can it be possible to allow a function to be defined outside
the scope of use to return a "mixin object"?
That's basically what I propose:
https://forum.dlang.org/post/msotbcaqipiiqxiup...@forum.dlang.org
this can be
On Wednesday, 19 April 2017 at 17:51:05 UTC, Nick Sabalausky
(Abscissa) wrote:
On 04/17/2017 03:41 PM, Jonas Drewsen wrote:
[...]
exho!"The number ${num} doubled is ${num * 2}!"
Also, it only works if you're just sending the string to
writeln. It doesn't help the general case :(
you can
I forgot to mention - the pros and cons of whether the string interpolation is
compile time or run time is a critical decision.
On 4/19/2017 5:04 AM, Jonas Drewsen wrote:
On Tuesday, 18 April 2017 at 08:42:38 UTC, Walter Bright wrote:
On 4/15/2017 1:04 PM, Jonas Drewsen wrote:
[...]
Thanks for doing the work to make a sample implementation, too. I don't know
if this will make it into D, but Jonas is a fine example of
}02d-%{day}02d", [
"year": yearsSinceEpoch + 1970,
"month": zeroBasedMonth + 1,
"day": zeroBasedDay + 1
]);
This way, implementation details like zero-based counting, years since
the Unix Epoch, etc
On Wednesday, 19 April 2017 at 13:04:08 UTC, Jonathan Marler
wrote:
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote:
On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen
wrote:
I can think of 3 reasons.
1. Requires GC.
NOTE: I believe that most applcations should use
On Tue, Apr 18, 2017 at 05:30:31PM -0700, Walter Bright via Digitalmars-d wrote:
[...]
> Reminds me of a story from the 1980s. Microsoft's MASM stood for
> "Macro Assembler". Inevitably, Microsoft programmers invented a pile
> of macros that sort of turned asm programming into a pseudo-high-level
On Wednesday, 19 April 2017 at 15:07:55 UTC, Jonas Drewsen wrote:
I'm talking about building format strings just yet... I'm just
working with the suggestion that Walter brought up with
converting the interpolated string into something that can be
fed into format e.g.:
$"The date is {%04d
On 04/17/2017 03:41 PM, Jonas Drewsen wrote:
On Monday, 17 April 2017 at 19:12:37 UTC, Martin Tschierschke wrote:
defining a new method exho! (derived from echo + mixin...:-)
auto exho(string x)(){
return mixin("writeln("~interp!x~")");}
You can just write:
exho!"The number ${num}
On Wednesday, 19 April 2017 at 16:19:09 UTC, Ola Fosheim Grøstad
wrote:
Yup. And actually also "while" and "for". More minimal
languages just have: block, conditional and
jump-to-start-of-block.
This reminds me of Rust's mid-level IR for some reason. For
instance, according to one of the
On Wednesday, 19 April 2017 at 09:49:16 UTC, Jacob Carlborg wrote:
On 2017-04-19 08:51, Ola Fosheim Grøstad wrote:
If you want AST-macros in D you should also argue for
redefining the
core language, and turn everything that is unnecessary and
that can be
done as lowering into macros (e.g.
On Wednesday, 19 April 2017 at 14:02:43 UTC, Stefan Koch wrote:
On Wednesday, 19 April 2017 at 12:10:33 UTC, Jonas Drewsen
wrote:
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote:
On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen
wrote:
What about supporting an
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote:
I really don't see how string interpolation is better then
` "The date is " ~ format("%04d", year)); `
That code is hideous, not hard to beat on every level...
inefficient, hard to read.
The built in thing could potentially
On Wednesday, 19 April 2017 at 12:10:33 UTC, Jonas Drewsen wrote:
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote:
On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen
wrote:
What about supporting an optional prefix inside the {} like:
int year = 2017;
format($"The date
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote:
On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen
wrote:
What about supporting an optional prefix inside the {} like:
int year = 2017;
format($"The date is {%04d year}");
so if there is a % immediately following the {
On Wednesday, 19 April 2017 at 12:03:47 UTC, Stefan Koch wrote:
On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen
wrote:
What about supporting an optional prefix inside the {} like:
int year = 2017;
format($"The date is {%04d year}");
so if there is a % immediately following the {
On Tuesday, 18 April 2017 at 08:42:38 UTC, Walter Bright wrote:
On 4/15/2017 1:04 PM, Jonas Drewsen wrote:
[...]
Thanks for doing the work to make a sample implementation, too.
I don't know if this will make it into D, but Jonas is a fine
example of a champion.
Thanks for the feedback.
On Wednesday, 19 April 2017 at 11:59:51 UTC, Jonas Drewsen wrote:
What about supporting an optional prefix inside the {} like:
int year = 2017;
format($"The date is {%04d year}");
so if there is a % immediately following the { then the chars
until next whitespace is format specifier. You can
On Wednesday, 19 April 2017 at 00:08:19 UTC, Walter Bright wrote:
On 4/18/2017 2:56 PM, Jonathan Marler wrote:
Have you thought about supporting format specifiers as well?
I looked at the C#
version and it looks like they can specify them using a colon
like this:
$"{a} in hex is {a:x}"
On Wednesday, 19 April 2017 at 00:08:19 UTC, Walter Bright wrote:
There are additional problems, such as:
$"{a} in %s {b}"
% should be escaped: "%s in %%s %s". There would be no use for a
single % otherwise.
and positional parameters:
$"{a} in {0}"
That would be literal 0: `"%s
On 2017-04-19 08:51, Ola Fosheim Grøstad wrote:
If you want AST-macros in D you should also argue for redefining the
core language, and turn everything that is unnecessary and that can be
done as lowering into macros (e.g. "for each").
If D had AST macros from the beginning, then yes,
On 2017-04-19 02:30, Walter Bright wrote:
I'm not saying you cannot do cool and useful things with AST macros. My
position is it encourages absolutely awful code as (usually
inexperienced) programmers compete to show how clever their macros are.
The language gets balkanized into a collection
On Monday, 17 April 2017 at 19:41:14 UTC, Jonas Drewsen wrote:
On Monday, 17 April 2017 at 19:12:37 UTC, Martin Tschierschke
wrote:
defining a new method exho! (derived from echo + mixin...:-)
auto exho(string x)(){
return mixin("writeln("~interp!x~")");}
You can just write:
On Wednesday, 19 April 2017 at 03:49:09 UTC, bpr wrote:
I don't think I've ever heard from Common Lisp, Scheme or
Clojure programmers that they'd like to remove macros from
their respective languages for the reasons you mention. I don't
see the disasters there. The Julia folks looked at the
On Wednesday, 19 April 2017 at 00:30:31 UTC, Walter Bright wrote:
I'm not saying you cannot do cool and useful things with AST
macros. My position is it encourages absolutely awful code as
(usually inexperienced) programmers compete to show how clever
their macros are.
I'd think that that's
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
I've been wanting to have support for interpolated strings in
D for some time now that will allow you to write e.g.:
[...]
One place I'd appreciate interpolated strings is as an option
when working with heredoc strings
On 4/18/2017 4:58 PM, bpr wrote:
Here's how it's done in Nim, a statically typed language similar to D, but with
Python syntax, and macros. It takes some knowledge to understand, sure, macros
are not a beginner tool, but wouldn't say this is extremely complex. I bet a
D-with-macros would have a
On 4/18/2017 2:56 PM, Jonathan Marler wrote:
Have you thought about supporting format specifiers as well? I looked at the C#
version and it looks like they can specify them using a colon like this:
$"{a} in hex is {a:x}"
There are additional problems, such as:
$"{a} in %s {b}"
and
On Tuesday, 18 April 2017 at 08:01:14 UTC, Jacob Carlborg wrote:
On 2017-04-18 08:59, Stefan Koch wrote:
The corresponding ast-macros would be extremely complex
No, it's not that complex.
Here's how it's done in Nim, a statically typed language similar
to D, but with Python syntax, and
On 2017-04-18 23:56, Jonathan Marler wrote:
I've thought about it and decided, I like this idea. I've only used
interpolated strings in PHP which left a bad taste, but I realized that
interpolating strings makes it impossible for your format string and
your arguments to get out of sync
On Tue, Apr 18, 2017 at 09:56:28PM +, Jonathan Marler via Digitalmars-d
wrote:
[...]
> I've thought about it and decided, I like this idea. I've only used
> interpolated strings in PHP which left a bad taste, but I realized
> that interpolating strings makes it impossible for yo
t simpler than Jonas' proposed implementation.
I've thought about it and decided, I like this idea. I've only
used interpolated strings in PHP which left a bad taste, but I
realized that interpolating strings makes it impossible for your
format string and your arguments to get out of sync. This
On Tuesday, 18 April 2017 at 08:50:07 UTC, Walter Bright wrote:
It may not be necessary to have any dependencies on any import.
$"{a} times 3 is {a*3}"
could be rewritten by the parser to:
"%s times 3 is %s", a, a * 3
and that is that. (I.e. just an AST rewrite.) It would be quite
a
On 2017-04-18 10:50, Walter Bright wrote:
It may not be necessary to have any dependencies on any import.
$"{a} times 3 is {a*3}"
could be rewritten by the parser to:
"%s times 3 is %s", a, a * 3
and that is that. (I.e. just an AST rewrite.) It would be quite a bit
simpler than
On 4/15/2017 4:51 PM, cym13 wrote:
Removing imports is a good point, the first concrete one to be mentionned. I'm
not sure it matters that much though as I think those imports are generic enough
that I believe they would be imported anyway, but it's a real point.
It may not be necessary to
On 4/15/2017 1:04 PM, Jonas Drewsen wrote:
[...]
Thanks for doing the work to make a sample implementation, too. I don't know if
this will make it into D, but Jonas is a fine example of a champion.
On 2017-04-18 08:59, Stefan Koch wrote:
The corresponding ast-macros would be extremely complex
No, it's not that complex.
, slow and worst
of all not checkable.
What do you mean "not checkable"?
--
/Jacob Carlborg
On Tuesday, 18 April 2017 at 06:54:11 UTC, Jacob Carlborg wrote:
On 2017-04-17 21:28, Jonas Drewsen wrote:
The page could also list pre-approved language
changes such as async functions (which Walter wants afaik).
Another feature that can be implemented with AST macros. This
is starting to
On 2017-04-17 21:28, Jonas Drewsen wrote:
The page could also list pre-approved language
changes such as async functions (which Walter wants afaik).
Another feature that can be implemented with AST macros. This is
starting to get ridicules. So many features have been added and are
talked
On Monday, 17 April 2017 at 19:12:37 UTC, Martin Tschierschke
wrote:
defining a new method exho! (derived from echo + mixin...:-)
auto exho(string x)(){
return mixin("writeln("~interp!x~")");}
You can just write:
exho!"The number ${num} doubled is ${num * 2}!"
It requires 'num' to
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
Hi all
I've been wanting to have support for interpolated strings in
D for some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
Hi all
I've been wanting to have support for interpolated strings in
D for some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've
ed is ${num *
2}!") );
Maybe I'm overlooking something obvious, but I haven't been
able to find a way to change it to either a template mixin or
even just a plain template without sacrificing to whole point
of interpolated strings: specifying the arguments 100% inline.
What I think
On Sunday, 16 April 2017 at 00:25:19 UTC, Stanislav Blinov wrote:
On Saturday, 15 April 2017 at 23:58:18 UTC, Adam D. Ruppe wrote:
On Saturday, 15 April 2017 at 23:11:42 UTC, Stanislav Blinov
wrote:
How about... it removes an import or two?
It doesn't actually remove the dependency, it is
On Monday, April 17, 2017 18:10:23 Jonas Drewsen via Digitalmars-d wrote:
> On Sunday, 16 April 2017 at 08:01:02 UTC, Jacob Carlborg wrote:
> > On 2017-04-15 22:04, Jonas Drewsen wrote:
> >> [...]
> >
> > My initial reaction is that this is something that can be
> > implemented as library code if
On Sunday, 16 April 2017 at 08:01:02 UTC, Jacob Carlborg wrote:
On 2017-04-15 22:04, Jonas Drewsen wrote:
[...]
My initial reaction is that this is something that can be
implemented as library code if the language would have support
for AST macros.
On the other hand, this is something I
On Sunday, 16 April 2017 at 16:10:15 UTC, Nick Sabalausky
(Abscissa) wrote:
Yea, and note, I'm still open to the idea of better names than
"interp". I'm still not entirely happy with that name. I'm even
half-tempted to use "_".
When I needed interpolation, I did not know about this library.
So
On 2017-04-16 18:10, Nick Sabalausky (Abscissa) wrote:
What I think would be ideal is a language enhancement to allow "interp"
to do its job without the extra syntactical noise. That would not only
give us good interpolates strings, but would likely have other
applications as well.
It's
overlooking something obvious, but I haven't been able
to find a way to change it to either a template mixin or even just a
plain template without sacrificing to whole point of interpolated
strings: specifying the arguments 100% inline.
What I think would be ideal is a language enhancement
On 2017-04-15 22:04, Jonas Drewsen wrote:
Hi all
I've been wanting to have support for interpolated strings in D for
some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've made a PR that adds th
On Sat, 2017-04-15 at 21:48 +, cym13 via Digitalmars-d wrote:
> […]
> structure is alike. This makes it *so* much easier. I want to be
> able to find bugs easily. I want D to be like python on that
> part. Not perl. Not ruby.
Python now has string interpolation, f-strings.
--
Russel.
On 4/15/17 10:04 PM, Jonas Drewsen wrote:
Hi all
I've been wanting to have support for interpolated strings in D for
some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've made a PR that adds th
On Saturday, 15 April 2017 at 23:58:18 UTC, Adam D. Ruppe wrote:
On Saturday, 15 April 2017 at 23:11:42 UTC, Stanislav Blinov
wrote:
How about... it removes an import or two?
It doesn't actually remove the dependency, it is just syntax
sugar over it (there is precedent for this in the
On Saturday, 15 April 2017 at 23:11:42 UTC, Stanislav Blinov
wrote:
How about... it removes an import or two?
It doesn't actually remove the dependency, it is just syntax
sugar over it (there is precedent for this in the language, the
pow operator calls a Phobos function, but it means you
On Saturday, 15 April 2017 at 23:11:42 UTC, Stanislav Blinov
wrote:
On Saturday, 15 April 2017 at 21:38:24 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:20:49 UTC, Stanislav Blinov
wrote:
On Saturday, 15 April 2017 at 20:12:41 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC,
On Saturday, 15 April 2017 at 21:38:24 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:20:49 UTC, Stanislav Blinov
wrote:
On Saturday, 15 April 2017 at 20:12:41 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen
wrote:
This has been proposed before, and I still
On Saturday, 15 April 2017 at 20:45:23 UTC, Jonas Drewsen wrote:
On Saturday, 15 April 2017 at 20:20:49 UTC, Stanislav Blinov
wrote:
On Saturday, 15 April 2017 at 20:12:41 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen
wrote:
This has been proposed before, and I
On Saturday, 15 April 2017 at 20:20:49 UTC, Stanislav Blinov
wrote:
On Saturday, 15 April 2017 at 20:12:41 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen
wrote:
This has been proposed before, and I still don't see the added
value compared to:
auto a=7;
On Saturday, 15 April 2017 at 21:03:27 UTC, Xinok wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
Hi all
I shared my thoughts on such a feature just a couple weeks ago:
https://forum.dlang.org/post/oedeijdewmhazaqaz...@forum.dlang.org
Most of you points applies to
On Saturday, 15 April 2017 at 20:57:33 UTC, Jack Stouffer wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
...
First, there's a process for language additions, please see
https://github.com/dlang/DIPs/blob/master/README.md
Secondly, I can tell you that any proposal
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
Hi all
I shared my thoughts on such a feature just a couple weeks ago:
https://forum.dlang.org/post/oedeijdewmhazaqaz...@forum.dlang.org
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
...
First, there's a process for language additions, please see
https://github.com/dlang/DIPs/blob/master/README.md
Secondly, I can tell you that any proposal that can be solved via
the standard library has a very low chance
On Saturday, 15 April 2017 at 20:35:56 UTC, crimaniak wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
The compiler will basically lower the $"..." string to a mixin
that concatenates
the expression parts of the (inside the {}) and the plain text
parts.
It's easy
On Saturday, 15 April 2017 at 20:20:49 UTC, Stanislav Blinov
wrote:
On Saturday, 15 April 2017 at 20:12:41 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen
wrote:
This has been proposed before, and I still don't see the added
value compared to:
auto a=7;
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
The compiler will basically lower the $"..." string to a mixin
that concatenates
the expression parts of the (inside the {}) and the plain text
parts.
It's easy implementable as a library (see
On Saturday, 15 April 2017 at 20:12:41 UTC, cym13 wrote:
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
This has been proposed before, and I still don't see the added
value compared to:
auto a=7;
writeln(a, " times 3 is ", a*3);
besides adding compiler complexity,
On Saturday, 15 April 2017 at 20:04:13 UTC, Jonas Drewsen wrote:
Hi all
I've been wanting to have support for interpolated strings in
D for some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've
Hi all
I've been wanting to have support for interpolated strings in D
for some time now that will allow you to write e.g.:
auto a = 7;
writeln( $"{a} times 3 is {a*3}" );
Code speaks louder that words so I've made a PR that adds this
support to ddmd as a RFC [1].
Th
On 2015-09-25 23:28, H. S. Teoh via Digitalmars-d-announce wrote:
It's to work around a dmd bug that doesn't allow overloads between
templates and non-templates. But I just checked, looks like that bug
may have been fixed since, so now the following overloads would work:
void
On 09/23/2015 08:42 PM, Meta wrote:
What about even just removing the syntax distinction between string
mixins and template mixins?
mixin "int i = 0";
mixin declareI!();
I like that idea. It it feasible? I'd always assumed the syntaxes were
different because they needed to be for some sort
On Friday, 25 September 2015 at 14:38:33 UTC, Nick Sabalausky
wrote:
I like that idea. It it feasible? I'd always assumed the
syntaxes were different because they needed to be for some sort
of technical reason. But now that I look at it...maybe that
could work after all?
At first glance I
On Fri, Sep 25, 2015 at 02:14:30PM +0200, Jacob Carlborg via
Digitalmars-d-announce wrote:
> On 2015-09-25 02:15, H. S. Teoh via Digitalmars-d-announce wrote:
>
> >I wanted to work on it, but haven't actually gotten to it yet.
> >Basically, the idea is relatively simple:
> >
> > //
On 2015-09-25 02:15, H. S. Teoh via Digitalmars-d-announce wrote:
I wanted to work on it, but haven't actually gotten to it yet.
Basically, the idea is relatively simple:
// compile-time variant
void writefln(string format="", A...)(A args)
if (format.length >
Am 23.09.2015 um 16:33 schrieb Nick Sabalausky:
(...)
void main()
{
int somevar = 42;
mixin interp;
iwriteln!("This is ${somevar}.");
int another = 17;
iwriteln!("This won't work, using ${another}.");
}
Seems like it would be too awkward and confusing to be
1 - 100 of 120 matches
Mail list logo