www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - I love D

reply Vitaliy Fadeev <vital.fadeev gmail.com> writes:
Just know this.
Sep 18 2023
next sibling parent reply Vitaliy Fadeev <vital.fadeev gmail.com> writes:
On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
wrote:
 ...
I like foreach. I like templates. I like ranges. Just look at this SDL event pool implementation: ```d foreach( e; pool ) process( e ); ``` I love short text blocks, like this: ```d // using pool struct Game { static Pool pool; Sensors sensors; void go() { foreach( d; pool ) sensors.sense( d ); } } ``` Nice: ```d void main() { game.go(); } ``` I love structured types, like this: ```d // event pool import bindbc.sdl; import types; struct Pool { D front; void popFront() { if ( SDL_WaitEvent( cast( SDL_Event* )&this.front ) == 0 ) throw new SDLException( "Pool.popFront: " ); } bool empty() { return ( front.type == SDL_QUIT ); } void opOpAssign( string op : "~" )( SDL_EventType t ) { SDL_Event event; event.type = t; SDL_PushEvent( &event ); // The event is copied into the queue. } } ```
Sep 18 2023
next sibling parent cc <cc nevernet.com> writes:
On Tuesday, 19 September 2023 at 04:43:25 UTC, Vitaliy Fadeev 
wrote:
 I like foreach.
I especially like *static* foreach. 😎
Sep 24 2023
prev sibling parent Alexandru Ermicioi <alexandru.ermicioi gmail.com> writes:
On Tuesday, 19 September 2023 at 04:43:25 UTC, Vitaliy Fadeev 
wrote:
 On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
 wrote:
 ...
I like foreach. I like templates. I like ranges.
I like arrayyyys, especially after a bit of c/c++, and php/java. D is middle earth!
Oct 06 2023
prev sibling next sibling parent Salih Dincer <salihdb hotmail.com> writes:
On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
wrote:
 Just know this.
+1 😍 SDB 79
Sep 18 2023
prev sibling next sibling parent reply "H. S. Teoh" <hsteoh qfbox.info> writes:
On Tue, Sep 19, 2023 at 04:34:30AM +0000, Vitaliy Fadeev via Digitalmars-d
wrote:
 Just know this.
Me too! One of my favorite parts: // Slow auto myData = iota(1_000_000).array; foreach (data; myData) { doSomething(data); } // Instant speedup: auto myData = iota(1_000_000).array; foreach (data; myData.parallel) { doSomething(data); } D r0x0rs! No, D boulders! :-D T -- Старый друг лучше новых двух.
Sep 20 2023
parent Walter Bright <newshound2 digitalmars.com> writes:
On 9/20/2023 4:01 PM, H. S. Teoh wrote:
 D r0x0rs!
 
 No, D boulders! :-D
Love it!
Sep 20 2023
prev sibling next sibling parent reply matheus <matheus gmail.com> writes:
On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
wrote:
 Just know this.
One thing that I like about D is... it has the performance of a System/compiled language at at same time supports GC. I'm not a language expert but coming from C that was very cool. Matheus.
Sep 20 2023
parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Thursday, 21 September 2023 at 01:07:30 UTC, matheus wrote:
 On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
 wrote:
 Just know this.
One thing that I like about D is... it has the performance of a System/compiled language at at same time supports GC. I'm not a language expert but coming from C that was very cool. Matheus.
Nice to see some praise to D for a change. We need more people like this
Sep 21 2023
next sibling parent bachmeier <no spam.net> writes:
On Thursday, 21 September 2023 at 16:29:43 UTC, Imperatorn wrote:

 Nice to see some praise to D for a change. We need more people 
 like this
Then you aren't talking to me. The internet culture (right or wrong) promotes criticism over praise.
Sep 21 2023
prev sibling parent reply Antonio <antoniocabreraperez gmail.com> writes:
On Thursday, 21 September 2023 at 16:29:43 UTC, Imperatorn wrote:
 On Thursday, 21 September 2023 at 01:07:30 UTC, matheus wrote:
 On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
 wrote:
 Just know this.
One thing that I like about D is... it has the performance of a System/compiled language at at same time supports GC. I'm not a language expert but coming from C that was very cool. Matheus.
Nice to see some praise to D for a change. We need more people like this
I love GC too. Too many discussions trying to kill GC.
Sep 24 2023
next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 22:33:56 UTC, Antonio wrote:
 On Thursday, 21 September 2023 at 16:29:43 UTC, Imperatorn 
 wrote:
 On Thursday, 21 September 2023 at 01:07:30 UTC, matheus wrote:
 On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
 wrote:
 Just know this.
One thing that I like about D is... it has the performance of a System/compiled language at at same time supports GC. I'm not a language expert but coming from C that was very cool. Matheus.
Nice to see some praise to D for a change. We need more people like this
I love GC too. Too many discussions trying to kill GC.
True, that's what makes D a bit unique in this field. And it's plasticity.
Sep 24 2023
prev sibling parent "H. S. Teoh" <hsteoh qfbox.info> writes:
On Sun, Sep 24, 2023 at 10:33:56PM +0000, Antonio via Digitalmars-d wrote:
 On Thursday, 21 September 2023 at 16:29:43 UTC, Imperatorn wrote:
 On Thursday, 21 September 2023 at 01:07:30 UTC, matheus wrote:
 On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev wrote:
 Just know this.
One thing that I like about D is... it has the performance of a System/compiled language at at same time supports GC. I'm not a language expert but coming from C that was very cool.
[...]
 Nice to see some praise to D for a change. We need more people like this
I love GC too. Too many discussions trying to kill GC.
+1. The GC is a real boon for not spending countless hours debugging memory leaks and pointer bugs. And for facilitating clean, understandable, composable internal APIs that aren't cluttered with memory management paraphrenalia spam. And for freeing up your mental resources to focus on actually making progress in the problem domain, rather than constantly wrangling with memory management issues. --T
Sep 25 2023
prev sibling next sibling parent IchorDev <zxinsworld gmail.com> writes:
On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
wrote:
 Just know this.
One thing I really love, personally, is how expressive you can get with APIs in D. In C I expect stuff like this: ```c /* bla bla ... is deprecated and should not be used ... bla bla */ void run(const Data* val, unsigned char* msg, const void* usr); ``` Whereas, in D I can write: ```d deprecated("should not be used ... bla bla") noreturn run(U)(scope const(Data)* val, string msg, in U usr) nothrow pure; ``` (without `-preview=in`: swap `in` for `auto ref const`) The specificity that D offers, particularly with `pure`, and `scope`, and `scope`'s derivatives, becomes really useful when you have to declare a public API with interfaces & classes. You can make sure that when you call something inheriting from a public interface that the call won't have side-effects, or that the foreign function won't store a pointer passed to it (that it doesn't own) anywhere.
Sep 21 2023
prev sibling parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Tuesday, 19 September 2023 at 04:34:30 UTC, Vitaliy Fadeev 
wrote:
 Just know this.
I wonder why D isn't more popular. Also we have arsd, so it's an automatic win.
Sep 24 2023
parent reply evilrat <evilrat666 gmail.com> writes:
On Sunday, 24 September 2023 at 07:27:39 UTC, Imperatorn wrote:
 I wonder why D isn't more popular.

 Also we have arsd, so it's an automatic win.
I think major points is: 1) most devs are web related - this means that even when using existing solutions there is demand on single-file binary distributions that can be deployed on target node(infrastructure management, clouds, etc...) without hassle, sure it is doable in D but people are lazy so they just choose Go and won't bother, esp. with such poor IDE's and debugging experience in D. 2) Since this unity fiasco last week I see many unity developers can they drop everything they made in godot without doing extra work, and some even demand to drop built-in scripting language I can't objectively say anything neutral so no comments, but this situation shows the mentality as well. (I must to say though there are wide gap between their skills, and truly experienced devs already showing some cool stuff made with godot on a level that I haven't seen before.) 3) Fresh programmers are looking at tooling first, more specifically jetbrains level IDE for the language they are going to use(or just invest their time to), this whole story when reading tons of reddit comments(and tech related QA boards) becoming very frustrating as people won't even consider using anything other than rust, go, or the very least C++, of course for that enterprise development there is basically only two There is also demand on readily available components/scripts/code assets from non-tech people who just wants to make something and don't want getting their feet wet from dealing with all this "tech stuff". So basically these 3 points are all intertangled, in short: D isn't yet mature enough, it is not yet polished enough for wide masses, the convinience and tooling "just sucks"(tm).
Sep 24 2023
next sibling parent evilrat <evilrat666 gmail.com> writes:
On Sunday, 24 September 2023 at 09:16:27 UTC, evilrat wrote:
 On Sunday, 24 September 2023 at 07:27:39 UTC, Imperatorn wrote:
 I wonder why D isn't more popular.

 Also we have arsd, so it's an automatic win.
I think major points is: ...
Oh and also probably the most important 4) Publicity and visibility (aka PR and advertisement): D is basically invisible, I rarely see any mentions of it in discussions, there is no advertisement, nobody talks about it. Don't get me wrong, we all hate ads and especially aggressive marketing, but without any publicity the thing is basically doesn't exists. Let's look at this situation - some big company that we all know about (for example that one softdrinks company with red logo), when they start a new flavor they put tons of money in advertisement, you will see it everywhere and it stays for months, literally it speaks from every toaster. No matter how skeptical and defensive you are you will end up buying that thing at least once, because you know, everyone talks about it, your mom talks about it, your coworkers talk about it, kids going to school talks about it, it can't be that bad right? So after quite some time you give up and do try it yourself to make a final decision if this is a BS or at least half-decent product. That's it. I can't not to cite it but here we have a saying like that "Millions of flies can't be wrong", if everyone talks about it (rust for example, no offense meant) it must be at least somewhat good, right?
Sep 24 2023
prev sibling next sibling parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D isn't yet 
 mature enough, it is not yet polished enough for wide masses, the 
 convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
Sep 24 2023
next sibling parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D 
 isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
Why not? They broke WinDbg? What have I missed
Sep 24 2023
parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 24/09/2023 11:09 PM, Imperatorn wrote:
 On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) Andrew 
 Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D isn't 
 yet mature enough, it is not yet polished enough for wide masses, the 
 convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
Why not? They broke WinDbg? What have I missed
WinDbg has never been a good experience with D or at least for me that is. No, they broke VS debugger (which gets used with vs-code too). Can't show locals anymore.
Sep 24 2023
next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 10:28:53 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 On 24/09/2023 11:09 PM, Imperatorn wrote:
 On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: 
 D isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
Why not? They broke WinDbg? What have I missed
WinDbg has never been a good experience with D or at least for me that is. No, they broke VS debugger (which gets used with vs-code too). Can't show locals anymore.
Oh, that's unfortunate. Some breaking change they did? Can we adapt?
Sep 24 2023
prev sibling next sibling parent reply cc <cc nevernet.com> writes:
On Sunday, 24 September 2023 at 10:28:53 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 WinDbg has never been a good experience with D or at least for 
 me that is.

 No, they broke VS debugger (which gets used with vs-code too).

 Can't show locals anymore.
Would be nice if there were a simple, just-works out of the box D debugger on Windows, particularly for the non-VS crowd.
Sep 24 2023
parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 25/09/2023 12:43 AM, cc wrote:
 Would be nice if there were a simple, just-works out of the box D 
 debugger on Windows, particularly for the non-VS crowd.
The VS debugger engine is available separately, however I think x64dbg could be a good candidate as it is OSS. Its missing locals & demangling, but because its OSS, it might be possible to fix both VS and x64dbg for locals in one go if we can get it working.
Sep 24 2023
prev sibling next sibling parent reply Guillaume Piolat <first.name gmail.com> writes:
On Sunday, 24 September 2023 at 10:28:53 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 WinDbg has never been a good experience with D or at least for 
 me that is.

 No, they broke VS debugger (which gets used with vs-code too).

 Can't show locals anymore.
I used WinDbg last week and I was surprised it has received a major update in usability from Miscrosoft. I was able to find a bug where Visual Studio wouldn't let me debug optimized code. WinDbg did when I pointed it the PDB, with an executable built outside of VisualD. It is now as simple to use as say, AMD uProf, and you can debug 32-bit and 64-bit indifferently.
Sep 24 2023
parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 13:03:20 UTC, Guillaume Piolat 
wrote:
 On Sunday, 24 September 2023 at 10:28:53 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 WinDbg has never been a good experience with D or at least for 
 me that is.

 No, they broke VS debugger (which gets used with vs-code too).

 Can't show locals anymore.
I used WinDbg last week and I was surprised it has received a major update in usability from Miscrosoft. I was able to find a bug where Visual Studio wouldn't let me debug optimized code. WinDbg did when I pointed it the PDB, with an executable built outside of VisualD. It is now as simple to use as say, AMD uProf, and you can debug 32-bit and 64-bit indifferently.
Are you using the preview or normal one?
Sep 24 2023
prev sibling parent reply claptrap <clap trap.com> writes:
On Sunday, 24 September 2023 at 10:28:53 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 On 24/09/2023 11:09 PM, Imperatorn wrote:
 On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: 
 D isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
Why not? They broke WinDbg? What have I missed
WinDbg has never been a good experience with D or at least for me that is. No, they broke VS debugger (which gets used with vs-code too). Can't show locals anymore.
Do you mean it just doesn't work in VSCode anymore? I mean you can still just debug the exe with visual studio?
Sep 24 2023
parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 25/09/2023 9:47 AM, claptrap wrote:
 Do you mean it just doesn't work in VSCode anymore? I mean you can still 
 just debug the exe with visual studio?
Same engine for both VS and VS-code (may depend upon the VS-code plugin tho). You can debug, but you lack locals. So very limited usability atm.
Sep 24 2023
parent evilrat <evilrat666 gmail.com> writes:
On Sunday, 24 September 2023 at 21:24:14 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 On 25/09/2023 9:47 AM, claptrap wrote:
 Do you mean it just doesn't work in VSCode anymore? I mean you 
 can still just debug the exe with visual studio?
Same engine for both VS and VS-code (may depend upon the VS-code plugin tho). You can debug, but you lack locals. So very limited usability atm.
In my case VSCode still works like before, but Visual Studio 17.7 locals panel got stuck with "Busy..." label when entering D function in call stack, and the whole IDE becomes sluggish. Though it could be yet another conflict with VisualD and ReSharper, previously I had to disable VisualD because it just hanged up from time to time.
Sep 24 2023
prev sibling parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D 
 isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
On windows i switched to remedybg, it's not free, but it works great and it's a just a 5mb executable https://i.imgur.com/pdKX71z.png
Sep 24 2023
next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 16:01:20 UTC, ryuukk_ wrote:
 On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D 
 isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
On windows i switched to remedybg, it's not free, but it works great and it's a just a 5mb executable https://i.imgur.com/pdKX71z.png
Looks nice!
Sep 24 2023
prev sibling next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 16:01:20 UTC, ryuukk_ wrote:
 On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D 
 isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
On windows i switched to remedybg, it's not free, but it works great and it's a just a 5mb executable https://i.imgur.com/pdKX71z.png
Thanks for the tip, I bought it.
Sep 24 2023
prev sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 16:01:20 UTC, ryuukk_ wrote:
 On Sunday, 24 September 2023 at 09:38:10 UTC, Richard (Rikki) 
 Andrew Cattermole wrote:
 On 24/09/2023 10:16 PM, evilrat wrote:
 So basically these 3 points are all intertangled, in short: D 
 isn't yet mature enough, it is not yet polished enough for 
 wide masses, the convinience and tooling "just sucks"(tm).
We don't even have a working debugger on Windows anymore. Thanks Microsoft.
On windows i switched to remedybg, it's not free, but it works great and it's a just a 5mb executable https://i.imgur.com/pdKX71z.png
I contacted the developer. He said support for D is on the roadmap when it comes to evaluating stuff from the stdlib.
Sep 26 2023
prev sibling next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Sunday, 24 September 2023 at 09:16:27 UTC, evilrat wrote:
 On Sunday, 24 September 2023 at 07:27:39 UTC, Imperatorn wrote:
 I wonder why D isn't more popular.

 Also we have arsd, so it's an automatic win.
I think major points is: 1) most devs are web related - this means that even when using existing solutions there is demand on single-file binary distributions that can be deployed on target node(infrastructure management, clouds, etc...) without hassle, sure it is doable in D but people are lazy so they just choose Go and won't bother, esp. with such poor IDE's and debugging experience in D. 2) Since this unity fiasco last week I see many unity or that, how can they drop everything they made in godot without doing extra work, and some even demand to drop built-in I can't objectively say anything neutral so no comments, but this situation shows the mentality as well. (I must to say though there are wide gap between their skills, and truly experienced devs already showing some cool stuff made with godot on a level that I haven't seen before.) 3) Fresh programmers are looking at tooling first, more specifically jetbrains level IDE for the language they are going to use(or just invest their time to), this whole story when reading tons of reddit comments(and tech related QA boards) becoming very frustrating as people won't even consider using anything other than rust, go, or the very least C++, of course for that enterprise development there is basically only There is also demand on readily available components/scripts/code assets from non-tech people who just wants to make something and don't want getting their feet wet from dealing with all this "tech stuff". So basically these 3 points are all intertangled, in short: D isn't yet mature enough, it is not yet polished enough for wide masses, the convinience and tooling "just sucks"(tm).
Web api can be made super easy with arsd.cgi. And I would say and speed. However, what D lacks is tooling. For example, let's say I want to persist data somewhere. super easy. Both model first (I usually do this initially) or code first. And if I want to change from MySQL to SQL or Postgres or whatever, I can count on that there will be a package for that and that it will take 5 minutes max to change, most of the time it's just to change config. In D, I don't know what the status is. My feeling is that it's "almost there". The language is mature enough, that's not the problem. It's the surrounding tooling and infrastructure. For example, when develop, I expect things to "just work", like debugging without even having to configure anything, symbol lookup on hover, code completion without hassle, refactoring capabilites, easy profiling, remote debugging, dependency incjection etc etc. I'm just writing some things from the top of my head. But I think you get the point. In summary, D as a language is mature. D as a complete developer experience is not yet mature enough, but I hope it will be soon, because D 100% has a place in the modern world.
Sep 24 2023
prev sibling parent reply bachmeier <no spam.net> writes:
On Sunday, 24 September 2023 at 09:16:27 UTC, evilrat wrote:
 On Sunday, 24 September 2023 at 07:27:39 UTC, Imperatorn wrote:
 I wonder why D isn't more popular.

 Also we have arsd, so it's an automatic win.
I think major points is: 1) most devs are web related
I don't think this is meaningful. Almost certainly more than 50% of people who call themselves programmers are working on things related to the web. That doesn't mean there aren't a lot of programmers working on other things like data science. Web programming is almost certainly a dead end today. That space is full. That just means D's opportunities are elsewhere.
Sep 25 2023
parent reply Antonio <antoniocabreraperez gmail.com> writes:
On Monday, 25 September 2023 at 17:51:05 UTC, bachmeier wrote:
 On Sunday, 24 September 2023 at 09:16:27 UTC, evilrat wrote:
 On Sunday, 24 September 2023 at 07:27:39 UTC, Imperatorn wrote:
 I wonder why D isn't more popular.

 Also we have arsd, so it's an automatic win.
I think major points is: 1) most devs are web related
I don't think this is meaningful. Almost certainly more than 50% of people who call themselves programmers are working on things related to the web. That doesn't mean there aren't a lot of programmers working on other things like data science. Web programming is almost certainly a dead end today. That space is full. That just means D's opportunities are elsewhere.
Creating a manufacturing line emulation with OPCUA interface.... Of course, management and visualization implemented in web. Don't close de door: every door opens a wide range of opportunities.
Sep 25 2023
next sibling parent Bruce Carneal <bcarneal gmail.com> writes:
On Tuesday, 26 September 2023 at 01:28:54 UTC, Antonio wrote:
 On Monday, 25 September 2023 at 17:51:05 UTC, bachmeier wrote:
 On Sunday, 24 September 2023 at 09:16:27 UTC, evilrat wrote:
 On Sunday, 24 September 2023 at 07:27:39 UTC, Imperatorn 
 wrote:
 I wonder why D isn't more popular.

 Also we have arsd, so it's an automatic win.
I think major points is: 1) most devs are web related
I don't think this is meaningful ... Web programming is almost certainly a dead end today. That space is full. That just means D's opportunities are elsewhere.
Creating a manufacturing line emulation with OPCUA interface.... Of course, management and visualization implemented in web. Don't close de door: every door opens a wide range of opportunities.
Indeed. Also note that many improvements to D and its ecosystem that could benefit Web programmers: faster simpler multi-core event handling, great strength to weight ratio database frameworks, better I/O abstractions generally, ... are foundational rather than Web specific.
Sep 25 2023
prev sibling parent reply bachmeier <no spam.net> writes:
On Tuesday, 26 September 2023 at 01:28:54 UTC, Antonio wrote:

 Creating a manufacturing line emulation with OPCUA interface....

 Of course, management and visualization implemented in web.

 Don't close de door: every door opens a wide range of 
 opportunities.
It's worth it if someone wants to do the work. I doubt that there's any realistic scenario where D will ever be a big player in web development. (Which is different from saying D will never be a good choice for web development. From the bit of web development I've seen, the standards are low.)
Sep 26 2023
parent reply harakim <harakim gmail.com> writes:
On Tuesday, 26 September 2023 at 15:55:36 UTC, bachmeier wrote:
 I doubt that there's any realistic scenario where D will ever 
 be a big player in web development.
development. I think D would be good at web development, but not something to drop dotnet over. I feel like D is really good at writing solid business logic that is predictable about how it will behave and perform. I don't need 500 frameworks to write usable code in D and I can use language features to tighten it up and reduce chances for mistakes. And the performance is good and you can reason about it. Also, I can do pretty much anything I want in it. school or job and that's not going to favor D any time soon. However, basically everyone goes and explores other languages. Think about when you explored a language. Why did you do it? In my experience, it usually boils down to having a specific project, finding a language that has that niche and doing the project. Once you do that, if the experience was decent, you give it another chance. Maybe you keep working on that original program. If it goes well, you naturally reach out for that language again for a future project. (I understand people try new languages, but unless they get a job, I rarely see them stick with it.) For example, I set out to write a game (niche). I looked at game engines and languages. No engines really supported the game I was making. I really liked C and Java but I had problems with both. So I stumbled on D. I had a good experience and I have come back ever since. I wrote the game again in D2. It was a great choice. I bought Andrei Alexandrescu's book and it was like a revelation. C-syntax with garbage collection and classes is good enough. The threading model, the direct memory access through pointers, bindings to C libraries and good performance really made me feel proud of what I had created. So since then, I've been committed. When I was running, my running partner collected data on his watch. He would dump the times, locations and elevations to me and I used excel to process it. I would calculate our best mile, our best 200m, how much hills affected our run and everything. It was slow, but it didn't need to be fast. The first version probably took me an hour and had most of what we wanted. As a result of the success, I always turn to excel or google sheets first for stuff like that now. I think D is barely lacking, but is lacking in every part of this process. People have come to D over the years. I think a lot of that is because if there a problem is no other language has focused on, D is by default a good choice because it is at least *good* at everything. In that sense, D has had good niches. In fact, D is one of the most common uncommon languages among older programmers. I was talking to someone at my work about the future of programming and mentioned D and I was right, he had used it before. So why is there a problem with niches? Because other languages and libraries for those languages have come a long way. And D hasn't kept up. There is no start to finish niche (for me) that D is good at. If I want to crunch numbers, I turn to excel. If I want to make a UI, I necessarily turn to Javascript/html and a self-loathing or else .NET and XAML. If I want to make a web backend, I can use dotnet or many people would use Java Spring or node.js. I mean, I can write a webserver in express.js in 20 minutes. As far as I can tell, there isn't a real good game engine solution in D yet (I haven't checked in a few years.) Now, if I just need a command line program, you better believe I'm writing it in D. Mostly the same for a TCP server. So, in my estimation, D doesn't have that start to finish experience that makes it strong in some niche. I want to emphasize that D is great for writing from scratch, so in my opinion for any new niche that emerges it's automatically a top player and that is a huge strength that keeps bringing people in. Once they get here, they might not have that smooth, successful experience. T They might be scared off by the lack of tooling. Most newer developers are used to tik tok, youtube and sub-20 minute tutorials. They are not used to learning a command line and having to actually learn language syntax from the get-go without IDE help. They are not used to having to look up documentation on libraries. The IDE just tells them with intellisense or module suggestion. Older developers are probably more open to lesser tooling in exchange for a better language. The library situation might leave a bad taste in their mouth. The standard library surprises me often with the functions it does have. However, it can be a bit hard to find them. If I were new, I would never think to look for string functions in std.algorithm. Also, some functions exist but are named differently than in every other language. I feel like that's fine, but it makes them hard to find. The documentation for the standard library has gotten much better since years ago, but it sometimes misses an essential example. Now that I understand the method signatures, this is not an issue, but it has been a big one in the past. When you don't understand the standard types or temples, the syntax of a simple function in the standard library can be difficult. I have thought about writing a book giving a tour of the standard library but my personal life does not allow for the time commitment I would need. Then there is the lack of third party libraries. Even if you find one, it might not compile anymore or the tutorial you are using might be so out of date it doesn't work anymore. That even goes for libraries that are just bindings. Andrei's book was essential for me to be successful with my D2 game. It did a good job making sense of the language features. Until I had that, I didn't even know why I wasn't allowed to cast an immutable to not immutable and vice versa. I understand in theory why it could be bad and appreciate it, but I didn't understand D was enforcing that. There were probably 10 or 20 of these gotchas that all piled onto each other and made reasoning difficult. The compiler errors are often no help. If it weren't for the book, I would have been lost. Then there are things that need to be cleaned up and that is vying with not breaking existing code. I think that balance, or strategy rather, will be the key for D's success in the years ahead. I think D is in a unique place being good at everything and not having a lot of dependencies. I think the industry is reaching a turning point where people will say enough is enough with all the frameworks. Then there are the tools that hang while they index or do intellisense. And, frankly, Java, Javascript and even Python are using so many third party libraries and frameworks these days that when something goes wrong, it is often the case that no one at a smaller company will be able to figure it out. Performance issues are taking up more time and money. And then there are the litany of security issues that arise from the interactions of hundreds of libraries. I don't think it's a sustainable path and a few co-workers have mentioned this to me as well. Just as kind of an aside, but you can already see bugs affecting a lot of life. There were some examples in the 2019 Dconf presentation "All Spreadsheets Must Die". I was talking with one of the people at my new job and they complained about the state of software. I told them I knew all about that. They said I had normalized it and I didn't realize. So I wrote them all down. I wrote dozens of things that week with at least one major issue a day from a XSS vulnerability at my credit card website and a financial website being unavailable to my plane decompressing! (To be sure, that might have been hardware.) I do web development for a living, but I still cringe every time I have to do front end work. Right now, I'm off and on trying to make D work as a front end language. Failing that, whatever language ends up being good for desktop UI development is going to draw me in with that niche. I'll still use D, but that language is going to earn a place at my table even if it's horrible at most everything else. I love D. I love the built in threads and messaging. I love the succinctness of associative arrays and lists. I sometimes love immutability. I like templates. I love that there is a GC option. There is so much more that I like and more that I just take for granted. I think a lot of other people would if they gave it a chance and I think I outlined the reasons. Like I said, D is at least good in basically every way. The issues I mentioned are not difficult, they just take work. I don't think any of these issues are as large as those facing other languages like C++ and Java. As for me, I hope I get time to contribute more to the D community and I'm happy with the direction it's going.
Oct 05 2023
parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Thursday, 5 October 2023 at 21:46:05 UTC, harakim wrote:
 On Tuesday, 26 September 2023 at 15:55:36 UTC, bachmeier wrote:
 [...]
development. I think D would be good at web development, but not something to drop dotnet over. [...]
Well said!
Oct 06 2023