On Monday, 8 August 2022 at 00:11:33 UTC, pascal111 wrote:
I don't have specific code but it was a general notice. Take
Python as in example, the same program in Python doesn't cost
much code as D code, and of course by putting in accounts that
that I assume that there are some special tasks D can do, while
Python can't do.
Yeah I don't think this is true. The only clear difference
between D and Python is the vast amount of libraries that Python
has and that D is a static-typed language, Python is not (by
default)
You generally don't write much more code.
Loops, ranges etc. are all just as pleasant to work with in D as
they are in Python.
I'd argue it's even easier to work with classes in D than in
Python, and even easier to work with metadata in D than any other
language.
Python has an unnecessary amount of verbosity when it comes to
OOP (because it really isn't an OOP language.)
I think D only looks verbose to people who don't really
understand its metaprogramming capabilities, templates and/or are
new to the language and perhaps come from dynamic typed languages.
But I don't think D is in particular more verbose than Python,
you can write very similar expressions and some code are almost
1:1 in Python and D when you only consider syntax.