4 days ago
On Mon, 24 Mar 2025 at 21:10, Martyn via Digitalmars-d < digitalmars-d@puremagic.com> wrote:

>
> - Tsoding made a pretty big fuss about "BetterC disabling dynamic arrays" but, again, his behaviour is a mix of humour and troll as well.
>

He probably just assumed there should be an array in the library (and he's
right to do so!). It probably didn't occur to him that things like arrays
and maps were intimately tied to the GC.
There should be containers in the library, and then we can remove that text
from the spec.
...but there's not! and there's reasons why...


3 days ago
On Tuesday, 25 March 2025 at 05:19:08 UTC, Manu wrote:
> On Mon, 24 Mar 2025 at 21:10, Martyn via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>
>> - Tsoding made a pretty big fuss about "BetterC disabling dynamic arrays" but, again, his behaviour is a mix of humour and troll as well.
>
> He probably just assumed there should be an array in the library (and he's right to do so!). It probably didn't occur to him that things like arrays and maps were intimately tied to the GC.
> There should be containers in the library, and then we can remove that text from the spec.
> ...but there's not! and there's reasons why...

Despite the fact that they're tied to the GC, I rather assumed one could create a library based version, which could preserve the array and slice syntax for use.  Declaration may well have to differ (using some form of template?)

Albeit they'd likely leak depending upon just how they were used.  c.f. Odin having dynamic arrays despite no GC.
3 days ago
On Tuesday, 25 March 2025 at 09:26:45 UTC, Derek Fawcus wrote:
> On Tuesday, 25 March 2025 at 05:19:08 UTC, Manu wrote:
>> On Mon, 24 Mar 2025 at 21:10, Martyn via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>>
>>> - Tsoding made a pretty big fuss about "BetterC disabling dynamic arrays" but, again, his behaviour is a mix of humour and troll as well.
>>
>> He probably just assumed there should be an array in the library (and he's right to do so!). It probably didn't occur to him that things like arrays and maps were intimately tied to the GC.
>> There should be containers in the library, and then we can remove that text from the spec.
>> ...but there's not! and there's reasons why...
>
> Despite the fact that they're tied to the GC, I rather assumed one could create a library based version, which could preserve the array and slice syntax for use.  Declaration may well have to differ (using some form of template?)
>
> Albeit they'd likely leak depending upon just how they were used.  c.f. Odin having dynamic arrays despite no GC.

Nothing special, after all Ada, Object Pascal/Delphi, Modula-2, Zig, C++ all provide them, also without GC, and without leaking assuming correct use, as they use the respective managed features available.

So indeed, there would be a way to have them without GC, but boils down to having multiple vocabulary types, and libraries needing to decide what approach to support.
3 days ago
On Tuesday, 25 March 2025 at 09:26:45 UTC, Derek Fawcus wrote:
> On Tuesday, 25 March 2025 at 05:19:08 UTC, Manu wrote:
>> On Mon, 24 Mar 2025 at 21:10, Martyn via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>>
>>> - Tsoding made a pretty big fuss about "BetterC disabling dynamic arrays" but, again, his behaviour is a mix of humour and troll as well.
>>
>> He probably just assumed there should be an array in the library (and he's right to do so!). It probably didn't occur to him that things like arrays and maps were intimately tied to the GC.
>> There should be containers in the library, and then we can remove that text from the spec.
>> ...but there's not! and there's reasons why...
>
> Despite the fact that they're tied to the GC, I rather assumed one could create a library based version, which could preserve the array and slice syntax for use.  Declaration may well have to differ (using some form of template?)
>
> Albeit they'd likely leak depending upon just how they were used.  c.f. Odin having dynamic arrays despite no GC.

Indeed, I wrote my own 'DynArray' type for use in betterC. Declaration is with 'DynArray!int intArray' for example. I then used overloads for opSlice and such to get pretty much the same functionality (e g. auto slice = intArray[2..4]). I can also wrap that with a reference counted type to help avoid leaks if lifetime and scope varies :)

3 days ago

On Tuesday, 25 March 2025 at 11:19:04 UTC, Mike Shah wrote:

>

Indeed, I wrote my own 'DynArray' type for use in betterC. Declaration is with 'DynArray!int intArray' for example. I then used overloads for opSlice and such to get pretty much the same functionality (e g. auto slice = intArray[2..4]). I can also wrap that with a reference counted type to help avoid leaks if lifetime and scope varies :)

std.container.array is basically this. Except it doesn’t work in BetterC :^)

3 days ago

On a completely different note, I loved the part at the end where Tsoding got confused about the enum keyword being used for string manifest constants.
At least I'm not the only one. :)
https://forum.dlang.org/post/amwowypgebdkktwnsfum@forum.dlang.org
Time stamp in the video:
https://www.youtube.com/watch?v=Gj5310KnUTQ&t=7396s

2 days ago
On Tuesday, 25 March 2025 at 11:19:04 UTC, Mike Shah wrote:
> On Tuesday, 25 March 2025 at 09:26:45 UTC, Derek Fawcus wrote:
>> [...]
>
> Indeed, I wrote my own 'DynArray' type for use in betterC. Declaration is with 'DynArray!int intArray' for example. I then used overloads for opSlice and such to get pretty much the same functionality (e g. auto slice = intArray[2..4]). I can also wrap that with a reference counted type to help avoid leaks if lifetime and scope varies :)

How about a session in your channel with him? :)
2 days ago
On Wednesday, 26 March 2025 at 15:58:54 UTC, Mengu wrote:
> On Tuesday, 25 March 2025 at 11:19:04 UTC, Mike Shah wrote:
>> On Tuesday, 25 March 2025 at 09:26:45 UTC, Derek Fawcus wrote:
>>> [...]
>>
>> Indeed, I wrote my own 'DynArray' type for use in betterC. Declaration is with 'DynArray!int intArray' for example. I then used overloads for opSlice and such to get pretty much the same functionality (e g. auto slice = intArray[2..4]). I can also wrap that with a reference counted type to help avoid leaks if lifetime and scope varies :)
>
> How about a session in your channel with him? :)

Nah.. tsoding is mostly a C guy
2 days ago
On Wednesday, 26 March 2025 at 15:58:54 UTC, Mengu wrote:
> On Tuesday, 25 March 2025 at 11:19:04 UTC, Mike Shah wrote:
>> On Tuesday, 25 March 2025 at 09:26:45 UTC, Derek Fawcus wrote:
>>> [...]
>>
>> Indeed, I wrote my own 'DynArray' type for use in betterC. Declaration is with 'DynArray!int intArray' for example. I then used overloads for opSlice and such to get pretty much the same functionality (e g. auto slice = intArray[2..4]). I can also wrap that with a reference counted type to help avoid leaks if lifetime and scope varies :)
>
> How about a session in your channel with him? :)

That would be fun if I could get in touch.
2 days ago

On Tuesday, 18 March 2025 at 20:00:01 UTC, Maximilian Naderer wrote:

>

Hello guys,

Not sure if you are aware a pretty big Streamer made a video about D!

Not that it’s important for me but he is really impressed with the language and was blown away a couple of times.

https://youtu.be/Gj5310KnUTQ?si=rSP50Uf9oeb4vLm1

Best regards,
Max

He streamed again, (vod is here: https://www.twitch.tv/videos/2415069952) and had a very negative experience trying to use betterC.

Lots of fixable issues he runs into.