Verbosity in D
judas.the.messiah.111 at gmail.com
Sun Aug 7 20:15:05 UTC 2022
On Sunday, 7 August 2022 at 16:45:15 UTC, jfondren wrote:
> On Sunday, 7 August 2022 at 16:01:08 UTC, pascal111 wrote:
>> It's clear by working with D that it has the same bad point
>> like Pascal language; the "verbosity". Is there any plans in
>> future to make some shorthanded techniques that clean
>> verbosity from D?
> That's not clear to me at all, and your Pascal example about a
> feature that C and D both have, that doesn't help either. Post
> some code that seems particularly verbose to you. I think
> 'library code' tends to grow attributes like mushrooms, and
> that D gets longer when you try to avoid the GC, but casual use
> of D isn't more verbose than scripting languages. With
> competitors like Rust and C++ Go and and Zig, D usually wins
> pretty significantly in this respect. The only consistently
> less verbose language in this space is Nim, IMO.
Do consider Go and Rust languages in the same level of C++ to
make this comparison? I didn't use these languages before but I
think they are just new languages which has no real history like
C++ to compare with!!!
> With that said, dmd previews =in and =shortenedMethods both
> allow shorter expressions in D. And there are some C++ (and
> even C) convenience features that D doesn't have, like
> destructuring binds, or doesn't like, like anonymous struct
> literals with named fields.
What destructuring binds? I didn't hear about that before.
More information about the Digitalmars-d-learn