October 29, 2021

On Friday, 29 October 2021 at 10:57:51 UTC, Imperatorn wrote:

>

On Friday, 29 October 2021 at 07:19:18 UTC, harakim wrote:

>

On Saturday, 23 October 2021 at 04:25:21 UTC, Dr Machine Code wrote:

>

[...]

In 2006, I set out to learn as many programming languages as I could so I would always be able to pick the best one. I had a notebook and kept notes about each one. I think I got through 56 languages before I realized D checked all my boxes and I just gave up.

[...]

That's exactly my journey. If D could just get a bit more tidy (reduce attributes etc) and improve the ecosystem, it would be perfect.

That's my opinion too. I think it's time to iron out the kinks in the language and library and make something stable. Then build an ecosystem around it. I could get behind that!

On Friday, 29 October 2021 at 08:34:53 UTC, deadalnix wrote:

>

On the other hand, you can present D code to a decent dev who never used D and they'll be able to make sense of it.

I mostly agree, but I don't think that's true of templates.

December 16, 2021

On Saturday, 23 October 2021 at 04:25:21 UTC, Dr Machine Code wrote:

>

Just would like to know you all opinions

Programming rust as a high level language only using the primitives in the standard library, you probably will do find. Aesthetics is not one of the strong sides of Rust in my opinion though and when you compare codes in Rosetta you often find that the rust implementation is longer.

When you step outside the box, then the ugliness starts to show up.

I was investigating the intrusive collections in Rust.

https://github.com/Amanieu/intrusive-rs

One notable file, src/adapter.rs you will see a macro intrusive_adapter. The purpose of the macro is to expand an entire implementation of the algorithm. I guess the author has done this because the generic system in Rust is too limited than using standard generics. If you abuse this macro you can in practice create a new expanded implementation for every source file you use it in which can lead to longer compile times and code duplication. You'd hope that the compiler is smart enough to remove duplicates of the same type.

One thing you notice is that the macro almost unreadable. I don't often agree with Walter but not allowing macros in D I do agree with. Adding macros to D would risk making the readability unbearable.

With many other languages, implementing these algorithms are often done in a few 100 lines but the Rust implementation is huge. You also notice that general code isn't that readable either.

In these cases you'd think that an offsetof compiler statement in order to find the offset of a member variable in a struct would help. Problem is that Rust doesn't have any offsetof. Rust has been around of over 10 years and offsetof is one of the first things you'd implement but not in Rust. There are crates that implements this and there you also notice how the authors has implemented hacks to achieve this simple thing.

The more I use Rust and look under the hood, the more what the h... revelations I get. I can see how Rust might appeals to the C++ crowd who likes the over complicated parts in C++ and that way gives them hubris when they circumvent the limitations of Rust.

December 19, 2021

On Saturday, 23 October 2021 at 05:52:42 UTC, Dr Machine Code wrote:

>

Same here, I just despise the syntax and couldn't get much used to it. I've tried to use more than once

Same. I looked at Rust and decided it wasn't for me, as there's some familiar syntax and then new stuff i couldn't make heads or tails of.

Same for C++, although my dislike for the language runs far deeper than Rust.

1 2 3 4 5
Next ›   Last »