On Sunday, 3 November 2024 at 20:04:19 UTC, DLearner wrote:
On Sunday, 3 November 2024 at 19:47:31 UTC, monkyyy wrote:
[...]
Id expect this to fail, but nothing I see in yours
```d
string foo="foo";
foo~="bar";
```
[]'s are both slices and dynamic arrays depending on use,
theres a debate about that decision(im of the opinion a `[?]`
should be a dynamic array and clean up the api), but the
current situation will only break on appends
Surely the line:
```
string Scrn = "OPO NAM='DspVar1' POS='1,1'
VAR=('IntVar1','I');E";
```
creates, by the definition of 'string', a dynamic array?
By default, a string literal is typed as a dynamic array, but the
element count is known at compile time. So all string literals
can be implicitly converted to an immutable static array.
[spec](https://dlang.org/spec/expression.html#string_literals)