default initialization of char arrays

not you not at you.not
Wed Oct 1 22:16:20 UTC 2025


On Wednesday, 1 October 2025 at 21:28:00 UTC, monkyyy wrote:
> On Wednesday, 1 October 2025 at 21:01:28 UTC, not you wrote:
>> On Wednesday, 1 October 2025 at 20:00:35 UTC, monkyyy wrote:
>>> On Wednesday, 1 October 2025 at 18:09:27 UTC, Ogion wrote:
>>>> On Wednesday, 10 September 2025 at 23:35:29 UTC, JN wrote:
>>>>> [...]
>>>>
>>>> Yep, the syntax should be more explicit. Something like this:
>>>> ```D
>>>> float[10] x = [42, ...];   // [42, NaN, ..., NaN]
>>>> float[10] y = [1:42, ...]; // [NaN, 42, NaN, ..., NaN]
>>>> ```
>>>
>>> nah they just going to break it without a replacement
>>
>> you can always create a mixin
>
> replacing 1 line of code with 30 isnt great

how often do you need this 'feature'? can you show a real world 
usecase?


More information about the Digitalmars-d mailing list