October 31, 2022
On Sunday, 30 October 2022 at 05:55:44 UTC, Walter Bright wrote:
> On 10/29/2022 7:14 PM, 12345swordy wrote:
>> C++/CLI is used manually to create a gateway to the .net framework from c++ and back. That and the fact the implementation is windows only so that greatly hinders the adoption of the language.
>
> I do understand that. But if it was a winner, why have none of the other C++ compilers adopted it? Why isn't in the C++ Standard? Why isn't it in the C Standard?


1. I believe D's GC is not a problem, D always say itself is `a systems programming language`, C#/Java/GO never say they are `a systems programming language`, they target users who don't care about GC.

No one will write an OS or "application on RTOS" by a GC lang.

In my option D should pointing to application developers like GUI/Web Server.

for GUI D can easily use exist C legacy, for web server it can improve their speed, "faster java" or "improved go".

2. Other problem for D is tools.

I tried code-d, the debugger never work for me, no rename/find reference in LSP. Others language like Go/Rust their LSP and vscode plugins is official maintained, but for D code-d looks like "WebFreak001" personally work.
October 31, 2022

On Monday, 31 October 2022 at 01:52:20 UTC, Mike Parker wrote:

>

I rarely engage with anyone bashing D on reddit/HN or wherever anymore. There's usually no point to it. I'll leave a comment to correct misinformation when I see it (e.g., "there used to be two standard libraries, one GC and one non-GC, and the GC library won" was a recent one I found), or to clarify something. My comments in that case are for people reading the thread, not for the person I'm replying to. Sometimes the original commenter will reply with something like, "Thanks. I didn't know that." or "My info must be out of date.", but that's very rare in my experience.

My advice: if you're happy with D, then ignore the crap people say and just get on with it. Work on your project, report issues, fix issues if you can, and if you can make the time, blog about your experiences.

This is the way.

October 30, 2022
On 10/30/2022 4:38 PM, Templated Person wrote:
> I don't understand why is it not a goal to replace the GC with Swift / Nim-like reference counting.
We've looked at RC so many times. It has problems with:

1. transitive const

2. needs an exception handler to decrement the count

3. some memory leak problems that need (ironically) an ownership/borrowing system to fix
October 30, 2022
On 10/30/2022 12:16 PM, Imperatorn wrote:
> It does not compute my friends.

Stories contributing to my education on this matter:

----------------------------
Company A would come to us and say: "we'll buy a bunch of your compilers, but we need X implemented."

We'd implemented X, and rush back to A: "we got X implemented! How many compilers do you wish to purchase?"

A says: "er, well, uhh, .... we also need Y! Yeah, do Y and we'll be ready to buy!"

You can guess where this goes. We do Y, and then they want Z. It's a never-ending merry-go-round. They were never going to buy it, they just didn't want to say that, so they'd just come up with some imagined deficit and use that as an excuse.
-----------------------------
A friend of mine, a Java user, in the 90's while talking to me said that what the world needs was a native Java compiler. He went on and on about it, saying it would be a huge success for me (I wrote a Java compiler for Symantec) and would make a big impact.

At the end of this, I said "I think you're right. So right, in fact, that I already developed a native Java compiler. You can download it right now and use it!"

He was silent. Of course he didn't download it. It didn't take the world by storm, either.
------------------------------
This was recounted by a friend of mine. He was kibitzing with a colleague who adamantly claimed that the most important feature of a C++ compiler was compile speed. So my friend asked him which C++ compiler he used. The reply was Microsoft C++. My friend laughed and said that compiler speed was the lowest priority to him, as MSC++ was, at the time, the slowest C++ compiler on the market. Zortech C++ was 4x as fast at compilation.

The most important feature for him was the brand name.
------------------------------
I was driving home after seeing a movie with friends. One them remarked about how I hated the movie. I was shocked, saying I loved the movie. The reply: "but you only said negative things about it." Upon reflection, that was an accurate description of what I did, and what I normally did.
------------------------------

The lessons I learned from this are:

1. some people just like to complain

2. existing users are far, far more worthwhile to listen to than others

3. existing users who have specific problems in their workflow with the product are the ones to prioritize

4. marketing is unbelievably important

5. be careful that you're not just making a faster horse. Sometimes you gotta take a chance and build a car
October 30, 2022
On 10/29/2022 11:48 PM, Paulo Pinto wrote:
> On Sunday, 30 October 2022 at 01:51:46 UTC, Walter Bright wrote:
>> On 10/29/2022 1:11 PM, Paulo Pinto wrote:
>>> Again mixing languages,
>>>
>>> __gc is from Managed C++, .NET 1.0
>>>
>>> C++/CLI, .NET 2.0 onwards, uses ^ for reference types and gcnew for GC heap.
>>
>> What's the difference between __gc* and ^ ?
> 
> Between Managed C++ and C++/CLI, none.
> 
> The latter replaces the former, Managed C++ died with .NET 2.0 release.
> 
> If we also bring C++/CX into the picture, ^ is a tracing GC pointer to .NET types in C++/CLI, while on C++/CX it is compiler native support for COM types with the compiler doing AddRef/Release calls on its own.
> 
> In modern native frameworks, WRL, WIL and C++/WinRT, the ^ get replaced by library smart pointer classes.

Thank you for the explanation. It's a syntactical change, not a semantic one.
October 31, 2022
On Monday, 31 October 2022 at 03:04:49 UTC, linger wrote:
> On Sunday, 30 October 2022 at 05:55:44 UTC, Walter Bright wrote:
>> On 10/29/2022 7:14 PM, 12345swordy wrote:
>>> C++/CLI is used manually to create a gateway to the .net framework from c++ and back. That and the fact the implementation is windows only so that greatly hinders the adoption of the language.
>>
>> I do understand that. But if it was a winner, why have none of the other C++ compilers adopted it? Why isn't in the C++ Standard? Why isn't it in the C Standard?
>
>
> 1. I believe D's GC is not a problem, D always say itself is `a systems programming language`, C#/Java/GO never say they are `a systems programming language`, they target users who don't care about GC.
>
> No one will write an OS or "application on RTOS" by a GC lang.
> ...

https://www.ptc.com/en/products/developer-tools/perc

https://www.aicas.com/wp/

https://www.astrobe.com/astrobe.htm

https://www.withsecure.com/en/solutions/innovative-security-hardware/usb-armory

https://www.wildernesslabs.co/

http://joeduffyblog.com/2015/11/03/blogging-about-midori/

https://www.wikiwand.com/en/Modula-2%2B

https://en.wikipedia.org/wiki/Oberon_(operating_system)

https://www.youtube.com/watch?v=z_dt7NG38V4

Just a small taste of OSes and RTOS products that were never written.

October 31, 2022
On Sunday, 30 October 2022 at 22:21:12 UTC, Walter Bright wrote:
> On 10/30/2022 12:26 PM, Paulo Pinto wrote:
>
>> You can read the documentation over here,
>> 
>> https://clang.llvm.org/docs/AutomaticReferenceCounting.html
>> 
>> https://developer.apple.com/library/archive/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011226
>> 
>> https://docs.swift.org/swift-book/LanguageGuide/AutomaticReferenceCounting.html
>
> I didn't realize you classified ARC as a separate pointer type. You can't do pointy things with it like pointer arithmetic, or taking the address of a variable with it. It's sort of like an associative array in D is a special type, but not what I'd consider a pointer type. Even class references in D are not really a special pointer type.
> ..

It is the same difference as GC pointers and untraced pointers in most languages with GC and low level systems programming capabilities.

You tag the pointer types with __autoreleasing, __strong, __unsafe_unretained, __weak.

And if you want to feel lucky instead of having safe code, you can also do pointer arithmetic with them, thankfully Swift only allows this in the unsafe variants.

See "Conversion of pointers to ownership-qualified types".

October 31, 2022
On Sunday, 30 October 2022 at 22:21:12 UTC, Walter Bright wrote:
> On 10/30/2022 12:26 PM, Paulo Pinto wrote:
>
>> You can read the documentation over here,
>> 
>> https://clang.llvm.org/docs/AutomaticReferenceCounting.html
>> 
>> https://developer.apple.com/library/archive/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011226
>> 
>> https://docs.swift.org/swift-book/LanguageGuide/AutomaticReferenceCounting.html
>
> I didn't realize you classified ARC as a separate pointer type. You can't do pointy things with it like pointer arithmetic, or taking the address of a variable with it. It's sort of like an associative array in D is a special type, but not what I'd consider a pointer type. Even class references in D are not really a special pointer type.
> ..

It is the same difference as GC pointers and untraced pointers in most languages with GC and low level systems programming capabilities.

You tag the pointer types with __autoreleasing, __strong, __unsafe_unretained, __weak.

And if you want to feel lucky instead of having safe code, you can also do pointer arithmetic with them, thankfully Swift only allows this in the unsafe variants.

See "Conversion of pointers to ownership-qualified types".

Regarding the question to managed pointers in Objective-C 2.0, it used write-barriers with a conservative GC for pointers explicitly marked as __strong or __weak. In @class declarations the pointers are implicitly __strong if not marked otherwise.

October 31, 2022

On Friday, 28 October 2022 at 09:51:04 UTC, Imperatorn wrote:

>

Hi guys,

Just wanted to remind you that, D maybe isn't that bad.

We're very good at bashing our own language, but we should also remember sometimes what it has given us.

I have spent the last months going through other languages, and I can say, the grass is always not so much greener on the other side.

Yes, there are more mature languages.
Yes, there are languages with better ecosystems.

But, just as an example - Zig - which is getting attention, is according to the community itself (including its creator) not in 1.0 until about 2025.

And still people use it, and might even think it's better than D.

Some information from their community (not my words)
It does not have a standardized package manager and build system.
It does not have an official registry of packages.
It is unstable.
It should not be used in production (actively advised against).
It changes so often that you can not rely on code to work even in 1 month from now.
etc

And still, people still think Zig is better for some reason.

Yes, D has it's flaws, true. But it's far from unfixable? Or is that what people believe?

Forget about Jai, Odin, Beef and all those languages.

Go - Welcome rheumatism 👴
Rust - Welcome brain tumor from not even being able to prototype something in less than 2 years 😩
C++ - Welcome to hell 🔥
...

The only real language out there that is close to what D is/could be is Nim and I respect it.
But, its syntax is not that kind to those who loved the curly braces.

All I'm saying is - maybe it's best if we just fix D?

There is some valid criticism, like the risk for attribute soup etc. But maybe it's fixable?

Remember what D gives you in terms of UFCS, CTFE, metaprogramming, performance, package manager, prototyping, inline assembly, 3 compilers for different use cases etc.

Is D really that bad?

The main probem of D is the miss of a killer library.

+ Java is still heavily used,
  Big data: hadoop, spark ...
  Next generation Database: neo4j, orie tDB, janusgraph...
   Search: elastic search...
+ C/rust: kernel usage
+ Python : Datascience, web (fastapi) a ease of developpement

D community has started some interresting but never reach its public
Mir, D dataframe, full futured web framework...
One of the problem of D it is some c++ user want user D as c++ alternative... without GC

While to me D is the mix of
  + Python ease of use, ability to script with rdmd
  + eiffel with contract programming
  + Java, garbage collector
 With some extras features
In one language that do 90% the work of c++ without to be a c++.

So as long as the community continues
 this schizophrenia, there is no hope
October 31, 2022

On Monday, 31 October 2022 at 10:09:13 UTC, Bioinfornatics wrote:

>
D community has started some interresting but never reach its public
Mir, D dataframe, full futured web framework...
One of the problem of D it is some c++ user want user D as c++ alternative... without GC

While to me D is the mix of
  + Python ease of use, ability to script with rdmd
  + eiffel with contract programming
  + Java, garbage collector
 With some extras features
In one language that do 90% the work of c++ without to be a c++.

So as long as the community continues
 this schizophrenia, there is no hope

D is a center language . It competes with all languages. Therefore, it has higher requirements!
GC cannot support it to survive in the intense competition.