www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - More D Features Working Their Way Into C++

reply Walter Bright <newshound2 digitalmars.com> writes:
https://twitter.com/WalterBright/status/1596658148932489218
Nov 26 2022
next sibling parent IGotD- <nise nise.com> writes:
On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
I think more in the line, C++ will introduce yet another way to code an existing thing. This gif never gets old and history keeps repeating itself. https://i.imgur.com/3wlxtI0.gifv
Nov 26 2022
prev sibling next sibling parent reply zjh <fqbqrr 163.com> writes:
On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
I can't access Twitter. But `big languages`, especially the strategy of `C++`, just follow others. Any language with new ideas will be copied. Therefore, small languages like `D` should first consolidate the existing implementation.
Nov 26 2022
next sibling parent reply Tejas <notrealemail gmail.com> writes:
On Sunday, 27 November 2022 at 01:22:57 UTC, zjh wrote:
 On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright 
 wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
I can't access Twitter. But `big languages`, especially the strategy of `C++`, just follow others. Any language with new ideas will be copied. Therefore, small languages like `D` should first consolidate the existing implementation.
Basically the `!` syntax used by our templates has been developed into [`Circle`](https://www.circle-lang.org/), not `C++` It looks like this ```cpp template![int N] void func(int i){ return N;} // Used like int d = func!44; ```
Nov 26 2022
parent reply Tejas <notrealemail gmail.com> writes:
On Sunday, 27 November 2022 at 03:12:37 UTC, Tejas wrote:
 On Sunday, 27 November 2022 at 01:22:57 UTC, zjh wrote:
 On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright 
 wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
I can't access Twitter. But `big languages`, especially the strategy of `C++`, just follow others. Any language with new ideas will be copied. Therefore, small languages like `D` should first consolidate the existing implementation.
Basically the `!` syntax used by our templates has been developed into [`Circle`](https://www.circle-lang.org/), not `C++` It looks like this ```cpp template![int N] void func(int i){ return N;} // Used like int d = func!44; ```
Correct code 😅 ```cpp template![int N] int func(int i){ return N;} // Used like int d = func!44; ```
Nov 26 2022
parent zjh <fqbqrr 163.com> writes:
On Sunday, 27 November 2022 at 03:14:03 UTC, Tejas wrote:

 ```cpp

  template![int N]
  int func(int i){ return N;}
  // Used like
  int d = func!44;

 ```
`template![int N]` can be `template[int N]`. Maybe it's too picky.
Nov 26 2022
prev sibling next sibling parent reply user1234 <user1234 12.de> writes:
On Sunday, 27 November 2022 at 01:22:57 UTC, zjh wrote:
 On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright 
 wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
I can't access Twitter.
If this works for you : https://nitter.net/WalterBright/status/1596658148932489218 Then install this plugin: https://chrome.google.com/webstore/detail/nitter-redirect/mohaicophfnifehkkkdbcejkflmgfkof
 But `big languages`, especially the strategy of `C++`, just 
 follow others. Any language with new ideas will be copied.
 Therefore, small languages like `D` should first consolidate 
 the existing implementation.
Nov 26 2022
parent zjh <fqbqrr 163.com> writes:
On Sunday, 27 November 2022 at 05:16:13 UTC, user1234 wrote:

 https://nitter.net/WalterBright/status/1596658148932489218
I can't visit, but thank you all the same.
Nov 26 2022
prev sibling parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
On Sunday, 27 November 2022 at 01:22:57 UTC, zjh wrote:
 On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright 
 wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
I can't access Twitter. But `big languages`, especially the strategy of `C++`, just follow others. Any language with new ideas will be copied. Therefore, small languages like `D` should first consolidate the existing implementation.
![image](https://user-images.githubusercontent.com/44361234/204141433-0b25557e-de74-4afa-a9d2-5230086d70b0.png)
Nov 27 2022
parent zjh <fqbqrr 163.com> writes:
On Sunday, 27 November 2022 at 14:49:01 UTC, ryuukk_ wrote:
 On Sunday, 27 November 2022 at 01:22:57 UTC, zjh wrote:
 ![image](https://user-images.githubusercontent.com/44361234/204141433-0b25557e-de74-4afa-a9d2-5230086d70b0.png)
`The latest `'C++'` can omit a lot of things. For example: ```cpp vector v1{"abc","def"}; //container void f(auto i){ ... }//this is a function template. ```
Nov 27 2022
prev sibling next sibling parent reply Paulo Pinto <pjmlp progtools.org> writes:
On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
Which is actually Circle, a C++ superset, without any guarantees if ISO C++ will ever adopt it. If it ever happens, it will be yet another reason to keep using C++, as the C++ developers will get D goodies, alongside the large ecosystem of libraries, IDE and graphical tooling that they enjoy today. So it is a bit of pyrrhic victory having C++ adopting D features.
Nov 27 2022
parent reply zjh <fqbqrr 163.com> writes:
On Sunday, 27 November 2022 at 09:04:23 UTC, Paulo Pinto wrote:
 On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright 
 wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
Which is actually Circle, a C++ superset, without any guarantees if ISO C++ will ever adopt it. If it ever happens, it will be yet another reason to keep using C++, as the C++ developers will get D goodies, alongside the large ecosystem of libraries, IDE and graphical tooling that they enjoy today. So it is a bit of pyrrhic victory having C++ adopting D features.
If `D` can be close to seamless interfacing `C++`, there will be many people using `C++` and `d` at the same time. This is not a bad thing. You can get the benefits of `C++` and `d` at the same time. Even, if you can seamlessly interface `rust`,`d` programmers can directly use the `rust` library. Wouldn't it be nice?
Nov 27 2022
parent reply Paulo Pinto <pjmlp progtools.org> writes:
On Sunday, 27 November 2022 at 09:25:53 UTC, zjh wrote:
 On Sunday, 27 November 2022 at 09:04:23 UTC, Paulo Pinto wrote:
 On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright 
 wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
Which is actually Circle, a C++ superset, without any guarantees if ISO C++ will ever adopt it. If it ever happens, it will be yet another reason to keep using C++, as the C++ developers will get D goodies, alongside the large ecosystem of libraries, IDE and graphical tooling that they enjoy today. So it is a bit of pyrrhic victory having C++ adopting D features.
If `D` can be close to seamless interfacing `C++`, there will be many people using `C++` and `d` at the same time. This is not a bad thing. You can get the benefits of `C++` and `d` at the same time. Even, if you can seamlessly interface `rust`,`d` programmers can directly use the `rust` library. Wouldn't it be nice?
Correct, however what is being discussed here, is C++ copying D features, thus making the switch even less relevant. number one partner tool to C++ for game developers. extensions for Unreal, while for D, one has to go through the hurdle to deal with Godot-D integration. While not that hard, it is an adoption obstacle. Yet D also lead the way there with Remedy Games and their usage of D. So patting one's back of which languages are copying D's features, or D did it first, hardly matters in the adoption game.
Nov 27 2022
next sibling parent Tejas <notrealemail gmail.com> writes:
On Sunday, 27 November 2022 at 10:30:24 UTC, Paulo Pinto wrote:
 On Sunday, 27 November 2022 at 09:25:53 UTC, zjh wrote:
 On Sunday, 27 November 2022 at 09:04:23 UTC, Paulo Pinto wrote:
 [...]
If `D` can be close to seamless interfacing `C++`, there will be many people using `C++` and `d` at the same time. This is not a bad thing. You can get the benefits of `C++` and `d` at the same time. Even, if you can seamlessly interface `rust`,`d` programmers can directly use the `rust` library. Wouldn't it be nice?
Correct, however what is being discussed here, is C++ copying D features, thus making the switch even less relevant. become the number one partner tool to C++ for game developers. extensions for Unreal, while for D, one has to go through the hurdle to deal with Godot-D integration. While not that hard, it is an adoption obstacle. Yet D also lead the way there with Remedy Games and their usage of D. So patting one's back of which languages are copying D's features, or D did it first, hardly matters in the adoption game.
I guess the feature that will differentiate D forever is the presence of the tracing GC and less cluttered syntax While C++ has it's smart pointers, one has to go through the effort of using them explicitly while you get access to memory safety in D rather transparently About the syntax, let's see if cppfront and Carbon go beyond being an "experiment"
Nov 27 2022
prev sibling parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
On Sunday, 27 November 2022 at 10:30:24 UTC, Paulo Pinto wrote:

 extensions for Unreal, while for D, one has to go through the 
 hurdle to deal with Godot-D integration. While not that hard, 
 it is an adoption obstacle.
Godot then got funding from Microsoft to start the work So it's not "organic", it was a Microsoft led initiative https://godotengine.org/article/introducing-csharp-godot
Nov 27 2022
parent reply Paulo Pinto <pjmlp progtools.org> writes:
On Sunday, 27 November 2022 at 14:52:43 UTC, ryuukk_ wrote:
 On Sunday, 27 November 2022 at 10:30:24 UTC, Paulo Pinto wrote:

 extensions for Unreal, while for D, one has to go through the 
 hurdle to deal with Godot-D integration. While not that hard, 
 it is an adoption obstacle.
Godot then got funding from Microsoft to start the work So it's not "organic", it was a Microsoft led initiative https://godotengine.org/article/introducing-csharp-godot
For Godot users it doesn't matter how it got there, only that it is available and they share their code with others with zero hassle. This is how language marketing works.
Nov 27 2022
parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
On Sunday, 27 November 2022 at 16:21:30 UTC, Paulo Pinto wrote:
 On Sunday, 27 November 2022 at 14:52:43 UTC, ryuukk_ wrote:
 On Sunday, 27 November 2022 at 10:30:24 UTC, Paulo Pinto wrote:

 extensions for Unreal, while for D, one has to go through the 
 hurdle to deal with Godot-D integration. While not that hard, 
 it is an adoption obstacle.
Godot then got funding from Microsoft to start the work So it's not "organic", it was a Microsoft led initiative https://godotengine.org/article/introducing-csharp-godot
For Godot users it doesn't matter how it got there, only that it is available and they share their code with others with zero hassle. This is how language marketing works.
Well it is important to know how it got there, because it emphasis the idea that the main character has to be pro-active the scripting languages available, Lua is very prominent in asia, Tencent even uses it for their unity games ton of bloated stuff with mono, the story there is not compelling AT ALL and not everyone is willing to bloat their C++ engine to implement another bloated environement, Unity is and it cost them a lot script in Unreal, and they are working on their own language, monogame/fna died, consoles/mobiles forbid JIT compilers coming years Embark studio gave up with the idea of making their own Rust based game engine, instead they pivoted to a "rust" plugin for Unreal for their 2 upcoming games (using Unreal 5) D can interop with C++, so it can co-exist in gamedev projects, including Unreal projects So if C++ community is starting to look at D features, maybe is a good time to remind them of how interopeable the language is, let's make them try the language But we have to remember that we compete with languages that are willing to change things to make them more compelling alternative It's no longer a world with just few languages, it's now a shit ton of different languages to choose from
Nov 27 2022
parent 12345swordy <alexanderheistermann gmail.com> writes:
On Sunday, 27 November 2022 at 17:16:47 UTC, ryuukk_ wrote:
 On Sunday, 27 November 2022 at 16:21:30 UTC, Paulo Pinto wrote:
 On Sunday, 27 November 2022 at 14:52:43 UTC, ryuukk_ wrote:
 On Sunday, 27 November 2022 at 10:30:24 UTC, Paulo Pinto 
 wrote:

 extensions for Unreal, while for D, one has to go through 
 the hurdle to deal with Godot-D integration. While not that 
 hard, it is an adoption obstacle.
Godot then got funding from Microsoft to start the work So it's not "organic", it was a Microsoft led initiative https://godotengine.org/article/introducing-csharp-godot
For Godot users it doesn't matter how it got there, only that it is available and they share their code with others with zero hassle. This is how language marketing works.
Well it is important to know how it got there, because it emphasis the idea that the main character has to be pro-active of the scripting languages available, Lua is very prominent in asia, Tencent even uses it for their unity games shit ton of bloated stuff with mono, the story there is not compelling AT ALL and not everyone is willing to bloat their C++ engine to implement another bloated environement, Unity is and it cost them a lot build script in Unreal, and they are working on their own language, monogame/fna died, consoles/mobiles forbid JIT compilers coming years Embark studio gave up with the idea of making their own Rust based game engine, instead they pivoted to a "rust" plugin for Unreal for their 2 upcoming games (using Unreal 5) D can interop with C++, so it can co-exist in gamedev projects, including Unreal projects So if C++ community is starting to look at D features, maybe is a good time to remind them of how interopeable the language is, let's make them try the language But we have to remember that we compete with languages that are willing to change things to make them more compelling alternative It's no longer a world with just few languages, it's now a shit ton of different languages to choose from
introduced their own version of the scoped feature. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-11.0/low-level-struct-improvements - Alex
Nov 27 2022
prev sibling parent ryuukk_ <ryuukk.dev gmail.com> writes:
On Sunday, 27 November 2022 at 00:20:08 UTC, Walter Bright wrote:
 https://twitter.com/WalterBright/status/1596658148932489218
They'll soon realize D is the proper C evolution
Nov 27 2022