On Thursday, 21 May 2020 at 06:57:28 UTC, mw wrote:
On Thursday, 21 May 2020 at 01:13:27 UTC, Paul Backus wrote:
On Wednesday, 20 May 2020 at 23:41:15 UTC, mw wrote:
Can we do string interpolation in D now?
There's an implementation in the dub package "scriptlike":
https://code.dlang.org/pac
On Thursday, 21 May 2020 at 17:17:49 UTC, Adam D. Ruppe wrote:
On Thursday, 21 May 2020 at 17:10:31 UTC, mw wrote:
BTW, is the .idup must be there?
It is discussed more in the github document but basically the
proposed built-in syntax returns a generic builder thing which
can make more than
On Thursday, 21 May 2020 at 18:12:01 UTC, ZK wrote:
I love the extensibility of this, but perhaps there should be
something like `ii"foo".idup` that's syntactic sugar for
`i"foo".idup`. New users might get confused by the need for
appending idup, and then they'll think about how other
language
On Thursday, 21 May 2020 at 17:10:31 UTC, mw wrote:
BTW, is the .idup must be there?
It is discussed more in the github document but basically the
proposed built-in syntax returns a generic builder thing which
can make more than just strings. The idup specifically asks it to
make a copy into
On Thursday, 21 May 2020 at 12:53:50 UTC, Adam D. Ruppe wrote:
On Thursday, 21 May 2020 at 06:57:28 UTC, mw wrote:
i.e how to write this 's'?
gimme a like on the proposal to add to the language!
https://github.com/dlang/DIPs/pull/186
If accepted, that would let you write
i"stuff here".idup
On Thursday, 21 May 2020 at 06:57:28 UTC, mw wrote:
i.e how to write this 's'?
gimme a like on the proposal to add to the language!
https://github.com/dlang/DIPs/pull/186
If accepted, that would let you write
i"stuff here".idup
to get an interpolated string.
On Thursday, 21 May 2020 at 06:57:28 UTC, mw wrote:
On Thursday, 21 May 2020 at 01:13:27 UTC, Paul Backus wrote:
On Wednesday, 20 May 2020 at 23:41:15 UTC, mw wrote:
Can we do string interpolation in D now?
There's an implementation in the dub package "scriptlike":
https://code.dlang.org/pac
On Thursday, 21 May 2020 at 01:13:27 UTC, Paul Backus wrote:
On Wednesday, 20 May 2020 at 23:41:15 UTC, mw wrote:
Can we do string interpolation in D now?
There's an implementation in the dub package "scriptlike":
https://code.dlang.org/packages/scriptlike#string-interpolation
Thank you! ve
On Wednesday, 20 May 2020 at 23:41:15 UTC, mw wrote:
Can we do string interpolation in D now?
There's an implementation in the dub package "scriptlike":
https://code.dlang.org/packages/scriptlike#string-interpolation
On Tuesday, 10 November 2015 at 13:36:44 UTC, Andrea Fontana
wrote:
On Tuesday, 10 November 2015 at 12:40:07 UTC, Márcio Martins
wrote:
writeln(interp!"The number #{a} is less than #{b}");
Quite pleasant syntax this way :)
Not sure if it's feasible to do this on the language side.
Yes. Here a
On Wednesday, 6 January 2016 at 23:30:22 UTC, Guillaume Piolat
wrote:
Is there a fancy way to have some kind of string interpolation
in D?
This is probably the best you're going to be able to do in D in
regards to string interpolation.
https://github.com/Abscissa/scriptlike#string-interpolat
On Wednesday, 6 January 2016 at 23:30:22 UTC, Guillaume Piolat
wrote:
Is there a fancy way to have some kind of string interpolation
in D?
Other than std.format.format that is?
On Tuesday, 10 November 2015 at 12:40:07 UTC, Márcio Martins
wrote:
writeln(interp!"The number #{a} is less than #{b}");
Quite pleasant syntax this way :)
Not sure if it's feasible to do this on the language side.
Yes. Here a (stupid!) proof of concept:
http://dpaste.dzfl.pl/74b1a4e3c8c6
On Tuesday, 10 November 2015 at 11:29:32 UTC, TheFlyingFiddle
wrote:
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
Ruby:
a = 1
b = 4
puts "The number #{a} is less than #{b}"
PHP:
$a = 1;
$b = 4;
echo "The nu
On Tuesday, 10 November 2015 at 11:29:32 UTC, TheFlyingFiddle
wrote:
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
Ruby:
a = 1
b = 4
puts "The number #{a} is less than #{b}"
PHP:
$a = 1;
$b = 4;
echo "The nu
On Tuesday, 10 November 2015 at 11:22:56 UTC, wobbles wrote:
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes
wrote:
[...]
std.string.format and std.fo
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
Ruby:
a = 1
b = 4
puts "The number #{a} is less than #{b}"
PHP:
$a = 1;
$b = 4;
echo "The number $a is less than $b";
D:
???
int a = 1, b = 4;
writefln("The nu
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
[...]
std.string.format and std.format are the standard options.
What are you missing?
Ruby:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
Hi,
The only example of string interpolation I've found so far is
on Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".fo
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
Hi,
The only example of string interpolation I've found so far is
on Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".format("little").writeln;
"Mary had a %2$s %1$s lamb.".format("littl
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
Hi,
The only example of string interpolation I've found so far is
on Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".format("little").writeln;
"Mary had a %2$s %1$s lamb.".format("littl
21 matches
Mail list logo