November 06, 2019
On Wednesday, 6 November 2019 at 12:14:33 UTC, drug wrote:
> Yes, I wasn't clear on that. Of course I meant it is hard in safe Rust.
> Just because in other case there is no reason to use Rust at all I believe

Well, I think Rust-developers have been overselling that aspect of Rust, but you could make the exact same argument for D.

If you benchmark against standard C++ practices then Rust borrowing only replaces some common cases of RAII in C++. If you cannot do it in a RAII-fashion in C++ then you cannot do it in Rust safe mode either.

You can make the exact same argument for D, though. And C++!

So, all 3 languages have a safe/unsafe dichotomy that can only be resolved fully with ADTs. In C++ it is checked in code reviews and by tooling, while Rust and D codifies that informal practice in the language to some extent.

In order to convince others that D is a better C++ alternative than Rust you'd have to argue encapsulation, meta-programming,  composability of ADTs and available frameworks that provide ADTs.

Basically do a comparison that shows that you can more easily in unsafe-mode build ADTs that competes with commonly used best-practice domain-specific C++ ADTs. And that using them in safe-mode is more convenient than in the competing languages (with comparable memory/speed performance).


November 06, 2019
On Tuesday, 5 November 2019 at 10:49:43 UTC, Ola Fosheim Grøstad wrote:
> Ok, so here is another github metric that is more interesting. Doing a "language:d" search and then look at the number of _users_

How does this even work? I tried this and added myself to the search and couldn't find me listed there despite working in multiple D related repos both mine and others. It does list all my PRs and commits but not me as an user.

November 06, 2019
On Wednesday, 6 November 2019 at 15:40:11 UTC, GoaLitiuM wrote:
> On Tuesday, 5 November 2019 at 10:49:43 UTC, Ola Fosheim Grøstad wrote:
>> Ok, so here is another github metric that is more interesting. Doing a "language:d" search and then look at the number of _users_
>
> How does this even work? I tried this and added myself to the search and couldn't find me listed there despite working in multiple D related repos both mine and others. It does list all my PRs and commits but not me as an user.

I suspect that mentioning dlang in your public bio is a factor of inclusion
November 06, 2019
On Wednesday, 6 November 2019 at 15:40:11 UTC, GoaLitiuM wrote:
> How does this even work? I tried this and added myself to the search and couldn't find me listed there despite working in multiple D related repos both mine and others. It does list all my PRs and commits but not me as an user.

Good question, Github is rather mysterious entity sometimes…

 I think the above mentioned Open Hub is a much better resource for measuring the "social evolution" of programming languages.

November 06, 2019
On 11/6/2019 1:40 AM, drug wrote:
> On 11/6/19 8:02 AM, Walter Bright wrote:
>> I'm going to speculate that Rust is a bit like pure functional programming. It's a great paradigm, but is inconvenient for that last mile of the code one needs to write. I've struggled with getting that last mile done with other languages (Pascal), and it would consume an inordinate amount of time.
> 
> I like your simile. Some developers complain that working with hardware in Rust means huge amount of unsafe code. The last mile in Rust can be really difficult.

For comparison, the last mile in C is quite straightforward. That instantly seduced me.


> For example in Rust it's very hard to implement tree where nodes can point to both its parent and children because in trivial case both parent and child node are borrow each other that is impossible in Rust.

Speaking as someone who's only Rust experience is reading the manual, there seems to be a lot of dependence on library code that is implemented in unsafe Rust.

Not that this is necessarily a bad thing, as I also promote the safe/unsafe code dichotomy.

D needs to make @safe the default, though.
November 06, 2019
On 11/6/2019 2:31 AM, bachmeier wrote:
> That meant that even ignoring the hideous syntax

I seriously don't like that syntax, either. The Ownership/Borrowing scheme for D does not introduce ANY new syntax other than @live. It'll look just like the code you're used to!
November 07, 2019
On 11/7/19 3:00 AM, Walter Bright wrote:
> Not that this is necessarily a bad thing, as I also promote the safe/unsafe code dichotomy.
> 
And I'm totally agree to you. That's the good engineering approach. But the Rust community is overselling Rust safety and this confuses me at least.

> D needs to make @safe the default, though.

No doubts

November 07, 2019
On 07.11.19 08:34, drug wrote:
> On 11/7/19 3:00 AM, Walter Bright wrote:
>> Not that this is necessarily a bad thing, as I also promote the safe/unsafe code dichotomy.
>>
> And I'm totally agree to you. That's the good engineering approach. But the Rust community is overselling Rust safety and this confuses me at least.

http://plv.mpi-sws.org/rustbelt/
November 07, 2019
On 07.11.19 01:03, Walter Bright wrote:
> On 11/6/2019 2:31 AM, bachmeier wrote:
>> That meant that even ignoring the hideous syntax
> 
> I seriously don't like that syntax, either. The Ownership/Borrowing scheme for D does not introduce ANY new syntax other than @live. It'll look just like the code you're used to!

That's not a plus. It will _mean_ something else. Therefore, you will have trouble at the interface between @live and non-@live code, because it is not the same language. Not to mention that @live without any further syntax changes will necessarily be even more restrictive than safe Rust.
November 07, 2019
On 11/7/19 12:41 PM, Timon Gehr wrote:
> On 07.11.19 08:34, drug wrote:
>> On 11/7/19 3:00 AM, Walter Bright wrote:
>>> Not that this is necessarily a bad thing, as I also promote the safe/unsafe code dichotomy.
>>>
>> And I'm totally agree to you. That's the good engineering approach. But the Rust community is overselling Rust safety and this confuses me at least.
> 
> http://plv.mpi-sws.org/rustbelt/

I think that Rust is a good language. I'm against cargo cult.