February 27
On Tuesday, 27 February 2024 at 06:19:53 UTC, Richard (Rikki) Andrew Cattermole wrote:

> A new standard library is currently in the works of being planned.
> It is lead by Adam Wilson who has buy in from both Walter and Atila.
> This ties into a new planned edition system for ensuring stability of language.
>
> https://github.com/LightBender/PhobosV3-Design
>

I'll add that containers are specifically a goal right now. Robert Schadek's upcoming DConf Online talk is related to that. He's volunteered to head up work on a container project, and Steven Schveighoffer has offered to help where he can. There's also somewhat related work on allocators that Atila and Paul Backus are heading up.
February 27

On Tuesday, 27 February 2024 at 07:44:26 UTC, zjh wrote:

>

On Tuesday, 27 February 2024 at 02:28:32 UTC, Manu wrote:

>

Walter: It's been too long, there are still no containers, which is embarrassing and stdcpp is still blocked on this.

You're absolutely right, it's just that there's no container library, and 'stdcpp' is a bit unstable.

Trying to build that at:
https://github.com/Inochi2D/numem

And indeed we hit the lack of move semantics, as it's possible to make a vector<shared_ptr!T> but of course vector<unique_ptr!T> encounters issues (it's very much like trying to do a vector of auto_ptr in C++98).

Curious what Robert will say about how to make proper containers.

February 27

On Tuesday, 27 February 2024 at 10:57:00 UTC, Guillaume Piolat wrote:

>

Trying to build that at:
https://github.com/Inochi2D/numem

Thank you for your infomation.

February 27
On Tue, 27 Feb 2024 at 18:01, Max Samukha via Digitalmars-d < digitalmars-d@puremagic.com> wrote:

> On Tuesday, 27 February 2024 at 07:20:46 UTC, Walter Bright wrote:
>
> > We do have a DIP on move semantics I wrote a while back:
> >
> > https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md
> >
> > but other demands always seem to get in the way.
>
> ImportC was not a demand!
>

👆👆👆

I've been really hammering the importance of this issue for *at least* 10
years. I'm so tired of hearing myself rant, I'm just way done. I'm still as
convinced as ever that the single most important thing you or anybody could
be doing for the language, is fixing the move hole.
I'd like to be on the DIP review panel. There are several issues that stand
out to me, which I think I'll need to sleep on to digest.

@value for extern(C++) is a gigantic breaking change. Approaching it from that angle is an interesting idea, but I wonder if it could be really noisy. Most code passes struct/class by ref in C++; by-val structs are fairly rare, so the idea might actually work out.

If symmetry or someone has a small budget, we should fly a small group of key individuals into a small room, lock the doors for a few days, and just get it done.


February 27
On Tue, 27 Feb 2024 at 22:16, Manu <turkeyman@gmail.com> wrote:

>
> On Tue, 27 Feb 2024 at 18:01, Max Samukha via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
>
>> On Tuesday, 27 February 2024 at 07:20:46 UTC, Walter Bright wrote:
>>
>> > We do have a DIP on move semantics I wrote a while back:
>> >
>> > https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md
>> >
>> > but other demands always seem to get in the way.
>>
>> ImportC was not a demand!
>>
>
> 👆👆👆
>
> I've been really hammering the importance of this issue for *at least* 10
> years. I'm so tired of hearing myself rant, I'm just way done. I'm still as
> convinced as ever that the single most important thing you or anybody could
> be doing for the language, is fixing the move hole.
> I'd like to be on the DIP review panel. There are several issues that
> stand out to me, which I think I'll need to sleep on to digest.
>
> @value for extern(C++) is a gigantic breaking change. Approaching it from that angle is an interesting idea, but I wonder if it could be really noisy. Most code passes struct/class by ref in C++; by-val structs are fairly rare, so the idea might actually work out.
>
> If symmetry or someone has a small budget, we should fly a small group of key individuals into a small room, lock the doors for a few days, and just get it done.
>

I'd like to see the DIP address this idiom (which Scott Meyers termed a
'universal reference'), which is ESSENTIAL in extern(C++) and must be
covered or practically no C++ code can ever be represented:
  template<T> void fun(T&& universalRef);
In this case; the template will be instantiated as `Ty&&` or `const Ty&`
depending on the rvalue-ness of the argument supplied at the call site.

I think `auto ref` needs to be covered by the DIP, and probably considered with respect to this point.


February 27
On 2/27/2024 4:16 AM, Manu wrote:
> I've been really hammering the importance of this issue for /at least/ 10 years. I'm so tired of hearing myself rant, I'm just way done. I'm still as convinced as ever that the single most important thing you or anybody could be doing for the language, is fixing the move hole.
> I'd like to be on the DIP review panel. There are several issues that stand out to me, which I think I'll need to sleep on to digest.

I'm looking forward to your thoughts on it. (Anyone can review any DIP.)

> @value for extern(C++) is a gigantic breaking change. Approaching it from that angle is an interesting idea, but I wonder if it could be really noisy. Most code passes struct/class by ref in C++; by-val structs are fairly rare, so the idea might actually work out.

Proof that you read the dip!

> If symmetry or someone has a small budget, we should fly a small group of key individuals into a small room, lock the doors for a few days, and just get it done.

Come to Seattle!
February 27
On 2/27/2024 4:45 AM, Manu wrote:
> I'd like to see the DIP address this idiom (which Scott Meyers termed a 'universal reference'), which is ESSENTIAL in extern(C++) and must be covered or practically no C++ code can ever be represented:
>    template<T> void fun(T&& universalRef);
> In this case; the template will be instantiated as `Ty&&` or `const Ty&` depending on the rvalue-ness of the argument supplied at the call site.
> 
> I think `auto ref` needs to be covered by the DIP, and probably considered with respect to this point.

Yeah, you're right.
February 28
On 2/27/24 13:16, Manu wrote:
> I'm still as convinced as ever that the single most important thing you or anybody could be doing for the language, is fixing the move hole.

FWIW I have been pushing this a couple times at the DLF meetings, but in the end somebody will have to put in the work to implement it in the compiler and I cannot spend the time required for that atm.

The move hole is also an issue for tuple unpacking though.
February 27
On 2/27/2024 4:42 PM, Timon Gehr wrote:
> FWIW I have been pushing this a couple times at the DLF meetings, but in the end somebody will have to put in the work to implement it in the compiler and I cannot spend the time required for that atm.
> 
> The move hole is also an issue for tuple unpacking though.

Reviewing the DIP would be a big help if that can work for you.

https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md
February 28
On Tuesday, 27 February 2024 at 07:56:44 UTC, Max Samukha wrote:
> On Tuesday, 27 February 2024 at 07:20:46 UTC, Walter Bright wrote:
>
>> We do have a DIP on move semantics I wrote a while back:
>>
>> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md
>>
>> but other demands always seem to get in the way.
>
> ImportC was not a demand!


If you use D with betterC like c (not cpp),  ImportC will work very well.

If you want to use well maintained C library (some of them take hundreds of thousands of manpower hours), you will need betterC.

And some library even write by cpp, still provide C interface for easy integration with other language like: rust, ruby, lua, php, java.


For me ImportC is more important than DIP1040, it open the doors for very many possibilities.