We are forking D

Timon Gehr timon.gehr at gmx.ch
Sun Jan 7 23:50:08 UTC 2024


On 1/7/24 10:04, Walter Bright wrote:
> 
> It's true that in order for this to work,
> 
> ```
> db.execi(i"INSERT INTO sample VALUES ($(id), $(name))");
> ```
> would need to be written as:
> ```
> db.execi(xxx!(i"INSERT INTO sample VALUES ($(id), $(name))"));
> ```
> where `xxx` is the thoroughly unimaginative name of the transformer 
> template.
> 
> Is adding the template call an undue burden?

Yes, among other reasons because it does not work.

This works with DIP1036:

```
int x=readln.strip.split.to!int;
db.execi(i"INSERT INTO sample VALUES ($(id), $(2*x))");
```

This cannot work:

```
int x=readln.strip.split.to!int;
db.execi(xxx!i"INSERT INTO sample VALUES ($(id), $(2*x))");
```




More information about the Digitalmars-d mailing list