April 14

On Saturday, 13 April 2024 at 13:55:50 UTC, Marconi wrote:

>

The fact that C still being used today is a clear sign that all language creators failed badly in not seeing the advantages of C, focused only on the disadvantages and exaggerated creating features that no one cares, creating too much possibilities of doing the same thing, getting only learning difficulties.

This is fallacious reasoning. You can find out if an argument is fallacious by reducing the reasoning to its atomic components or by switching out the subjects of the argument. In order to remove the irrationality once and for all, I have applied your exact reasoning 3 times for demonstrating my point:

The fact that bicycles are still being used today is a clear sign that car manufacturers failed badly in not seeing the advantages of bicycles, focused only on the disadvantages and exaggerated creating features that no one cares, creating too many possibilities of doing the same thing, getting only learning difficulties.

The fact that margarine is still being used today is a clear sign that butter producers failed badly in not seeing the advantages of margarine, focused only on the disadvantages and exaggerated taste and health benefits that no one cares, creating too many possibilities of doing the same thing, getting only learning difficulties.

The fact that dictatorships still exist today is a clear sign that democracies failed badly in not seeing the advantages of dictatorship, focused only on the disadvantages and exaggerated individual rights and privileges one cares, creating too many possibilities of doing the same thing, getting only learning difficulties.

correlation != causation

>

What D should be?
C with fat pointers, no header files and a big OO standard library.
That's it. A better C. A new C. 90% C + 5% Cpp + 5% Java.

It already exists, it's called BetterC. You could also just abstain yourself from using the features you don't like without using BetterC that way you can still use the libraries other people wrote. Alternatively, you could make your own language. That's what the creators of C2 and C3 did. Maybe you could call it C4, I'm sure it would explode in popularity with a name like that. Anyways nobody is going to downgrade D just because you don't like extra features that you don't even have to use.

>

C++ has the advantage of being compatible, but didn't solve the main pointer's problem.
Java is almost this, but VM was a terrible decision (great only for marketing) and GC is good for bad programmers (sorry).
Dlang displease C/C++ programmers for having GC and didn't get any of Java programmers.

D is also highly compatible with C, more so than most languages if not all of them. It's even able to interface with most other languages directly (like C or C++) or with some tinkering with the advanced features of D (like in the case of R and Rust).

D doesn't displease C and C++ programmers for having a GC. The GC and the runtime are optional after all and writing your own stuff without using the included batteries is the pleasure of most hardcore fans of those two languages. C and C++ programmers dislike D for the same reason they dislike all other languages: D is neither C nor C++. C programmers will only use C and C++ programmers will only use C++. They are not interested in learning any other language.

GC is good for all programmers, talented and terrible. It saves time for the good ones and it saves the bad ones from writing a time bomb. And even the good ones can make mistakes. Memory allocation errors are not always obvious and may go unnoticed for a long time. You're not only required to be good and diligent, you're required to be perfect. You may not commit one single mistake. Nobody's perfect and I'm sure you are far from perfect yourself seeing the level of logic in your reasoning; I'm afraid of what it looks like in your code.

April 15

On Saturday, 13 April 2024 at 13:55:50 UTC, Marconi wrote:

>

.. snip
What D should be?
C with fat pointers, no header files and a big OO standard library.
That's it. A better C. A new C. 90% C + 5% Cpp + 5% Java.
.. snip

D is a swiss army knife of programming languages. It supports many ways to get a problem done.

However... D can also be open to disagreements because... it is a swiss army knife!

What I mean is D is trying to please everyone. It can be very difficult to get right when you have programmers from different career backgrounds throwing in their views of what D should (and shouldn't) be.

In part we have a confusion of what D is trying to be. Some see it as a C or C++ replacement. Others see it as a Java or C# one (and others). The rest see it as a replacement of all the above.

I can be guilty of this as well. I have my preferences of where I would like D to go. We all do. Regardless, D is here adnd its current position stays. I dont think anyone at this point for force out features just because. Reality is while some want to ditch the GC, there are others on here that would want to force it on you.

I think we should be targeting the C\C++ guys but competition is growing. We not only have Rust, but others like Zig and Odin. Trying to win over a Java or C# dev is going to be tough especially when developer has gained experience and familiarity of the language. Also factor in job security. Mid-to-Large companies likely favour Microsoft tools so C#, along with Azure, SQL Server, etc, is not going anywhere. It is not about individual devs, but companies themselves enforcing what you will be using. It is a hard battle to win in my opinion.

The more I have used D, the more I have been using BetterC. I have become familiar with what I can and cannot do with BetterC. It really is experience. However, I don't think it is easy when you are new to D, and browsing around the website for the first time.

For new devs coming from a Java or C# background, the Dlang Tour and Guide is good. Sadly, those that come from a C or C++ background are likely put off pretty quickly. The landing page, to me, makes D come across as a garbage collected language only.

Maybe this is the intention by the core team as this will lose interest for certain newcommers and focus on their main audience. It is possible.

Continuing, I come across pages like so:-

Eventually I see some code like filter! or Ranges, etc. I would be very impressed with the compiler likely telling me to "perhaps import std.stdio;" -- so far, so good.

Once I understood some basic D features, I would then be looking at the Garbage Collector. Can I turn it off?

I couldn't find the answers I wanted on the website. The overview had a sentence for "Explicit Memory Management" with no links.
"Automatic Memory Management" on the other hand had more text and a link!

Even the Garbage Collector page did not redirect me to how to disable it. At least, I could not see it. I tried searching on the page but unsuccessful.

I am sure, at this point, I would be googling around, or using Stack overflow or reddit, etc. Now I would be trying to find answers outside of the D website.

Once I discovered -betterC I would struggle to understand why it is called "Better C". I am trying to learn D afterall. After adding the flag and running the compiler, I now receive the following sample errors:-

  • cannot use try-catch..
  • template instance std.stdio.File.write!..
  • TypeInfo_Class..

What? I did not use try-catch! Oh, so I cannot use Ranges.
What? std.stdio.File.write causes an error? This worked before i added -betterC. Oh.. stdio, or parts of it, must be using the GC.
What? BetterC is just better C. Guess I cannot improve my C++ that has classes?

The learning would continue but there is a chance, if the site did not lose my interest earlier... you have now.

Maybe the DLang Tour needs a little more TLC. Start off with their purpose of using D. Maybe BetterC should be there from the get go! branch off in 2 directions. You want to try do in all its glory.. go here. Want to turn off the Garbage Collector.. go betterC! etetera!!

April 15

On Monday, 15 April 2024 at 16:40:20 UTC, Martyn wrote:

>

What? I did not use try-catch! Oh, so I cannot use Ranges.
What? std.stdio.File.write causes an error? This worked before i added -betterC. Oh.. stdio, or parts of it, must be using the GC.
What? BetterC is just better C. Guess I cannot improve my C++ that has classes?

The learning would continue but there is a chance, if the site did not lose my interest earlier... you have now.

Maybe the DLang Tour needs a little more TLC. Start off with their purpose of using D. Maybe BetterC should be there from the get go! branch off in 2 directions. You want to try do in all its glory.. go here. Want to turn off the Garbage Collector.. go betterC! etetera!!

I have criticized the state of D's horrible documentation for as long as I've been here. The documentation is lacking, it's never really explicit and it uses pure D jargon that is not easily understandable from an outside perspective. At this point, I learn more by just asking on discord than "reading the fucking manual".

April 16

On Monday, 15 April 2024 at 16:40:20 UTC, Martyn wrote:

>

On Saturday, 13 April 2024 at 13:55:50 UTC, Marconi wrote:

>

Maybe the DLang Tour needs a little more TLC. Start off with their purpose of using D. Maybe BetterC should be there from the get go! branch off in 2 directions. You want to try do in all its glory.. go here. Want to turn off the Garbage Collector.. go betterC! etetera!!

Diverting different user groups may be a good idea.

April 19

On Saturday, 13 April 2024 at 18:32:12 UTC, Steven Schveighoffer wrote:

>

C is not the best programming language, by a longshot. I would hate to write code in C.

It's just that the C ecosystem is vast.

C programmer here. I've written thousands of lines of new C code just this year (new features for a large existing code-base).

For what it's worth, D is the first compiled language to get me to enthusiastically change languages. I tried a few others first. C++ boost library errors were just too damn hard to grok, and the Java was too verbose for me. C# was too Windows centric, and the associated tool chain was mega-bloated. Go was missing too many features. Rust was bizarre. In contrast, D is terse, almost a flexible as python, and not too opinionated, so I selected it as the best option at the time and haven't looked back.

Anyway, I think the D core developers are doing a lot of things right and the continual questioning of the core language philosophy seems like a waste of time to me. I was able to accomplish tasks in D in 2023 that I would never have attempted in C + Python. I'm able to support a whole space mission's science ground support architecture pretty much on my own. D let me do that. Other languages probably could have too, but I know this one did and I appreciate everyone's work in getting D this far.

Thanks for the tools, they make my job easier.

April 19

On Friday, 19 April 2024 at 04:05:22 UTC, Chris Piker wrote:

>

On Saturday, 13 April 2024 at 18:32:12 UTC, Steven Schveighoffer wrote:

>

[...]

C programmer here. I've written thousands of lines of new C code just this year (new features for a large existing code-base).

[...]

Awesome that D worked out for you!

April 20

On Monday, 15 April 2024 at 21:40:14 UTC, Doigt wrote:

> >

Maybe the DLang Tour needs a little more TLC. Start off with their purpose of using D. Maybe BetterC should be there from the get go! branch off in 2 directions. You want to try do in all its glory.. go here. Want to turn off the Garbage Collector.. go betterC! etetera!!

I've never even looked at it until just now. It's very, very brief.

Sure, I suppose it can be made to be fancier overall. I suppose having two branches is a good idea; one for systems programming that includes @nogc and betterC, the other for those who like it easy. I'm not sure what's the best way to quickly communicate this.

>

I have criticized the state of D's horrible documentation for as long as I've been here. The documentation is lacking, it's never really explicit and it uses pure D jargon that is not easily understandable from an outside perspective. At this point, I learn more by just asking on discord than "reading the fucking manual".

Is this about Phobos, or something else. My perception was that the Phobos documentation is pretty good, though I suppose it can be clearer in some cases as to what types a function accepts as arguments. I don't think it's any worse than the PHP library documentation.

Now would someone coming from a C or C++ background be more or less forgiving than me? Someone from such a background would have programming experience that may give them better ability to make the most of lousy documentation, but then again, they may have seen more good documentation than I have.

Given how obscure this language is, I was pleased to see how much documentation there is. It was interesting to discover that the writers are largely the same people I've been interacting with here.

April 21
On Friday, 19 April 2024 at 04:05:22 UTC, Chris Piker wrote:
>
> ...
> Anyway, I think the D core developers are doing a lot of things right and the continual questioning of the core language philosophy seems like a waste of time to me.....

This so called 'questioning' is inevitable for D, so best to 'make peace' with that.

Thats because D is torn between being a language with 1970's style manual memory management and its VERY VERY VERY VERY strong interopability with C, on the one-hand, and on the other - having 21st century style automatic memory management, and an ever increasing focus on being a 'memory safe' language.

These two approaches are difficult to reconcile, philosophically ;-)

That they can be reconciled technically, at a language and compiler level, is a bit of a masterpiece really - and btw, *that* is the 'Real D'.

Trying to reconcile these two very different approaches, comes with a cost - and that too is the 'Real D'.

April 23
On Sunday, 21 April 2024 at 03:47:08 UTC, ShowMeTheWay wrote:
> These two approaches are difficult to reconcile, philosophically ;-)

Vlang - Simple language for building maintainable programs
Ziglang - Focus on debugging your application rather than debugging your programming language knowledge. (simple, maintainable)
Rust - Reliable and efficient software.
C++ - C with Zero Cost Abstraction
D - D shines from low-level control to high-level abstraction. Fast code, [running?]fast.
C - Simple. Efficiency. Close-to-Hardware Programming. "Nothing is better than C" "When i see C, i see the assembler" - Linus
Java - "Write once, run anywhere." Not so true, but work great in terms of propaganda. GUI in java sucks, its better create different efficient programs for each system than just a one bad java software. What Java really has great its a big standard API.

So, the right order of principles:
Simple (maintainable), fast, big organized standard library.

That's why C still shines. Its still simple and fast.
Thats's why everybody wants replace C++. Its fast, but hard to learn and mantain.
Thats's why everybody wants replace Java. Its simple, but slow.
Thats's why Rust is growing but will die. Its fast, but hard and becoming more and more hard.

If D create some new way to make manual memory management easily, in such a way that the lovers of GC would not be so furious... the language could reach almost the perfection.

Default GC was the biggest D mistake.







April 23

On Tuesday, 23 April 2024 at 14:56:50 UTC, Marconi wrote:

>

Default GC was the biggest D mistake.

+1.