C++ still doesn't have good loop syntax
Meta
jared771 at gmail.com
Wed Jul 15 18:35:09 UTC 2026
On Wednesday, 15 July 2026 at 17:02:10 UTC, Adam D. Ruppe wrote:
> On Wednesday, 15 July 2026 at 15:28:54 UTC, H. S. Teoh wrote:
>>> ```d
>>> string[$] vec = [ ... ]; // or some equivalent syntax
>>> ```
>>
>> Didn't OpenD already implement this feature?
>
> Yes, we merged the PR upstream rejected.
>
> void main() {
> string[$] a = ["a", "b"];
> pragma(msg, typeof(a));
> }
>
> $ opend -o- sa
> string[2]
>
Oh, very nice.
More information about the Digitalmars-d
mailing list