Verbosity in D
jfondren
julian.fondren at gmail.com
Sun Aug 7 16:45:15 UTC 2022
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.
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.
More information about the Digitalmars-d-learn
mailing list