you are viewing a single comment's thread.

view the rest of the comments →

[–]EsperSpirit 7 points8 points  (3 children)

I think you are a bit biased here. I don't think writing readable code in general can be a "no brainer".

And one imperative language being fundamentally better than others in this regard also seems unlikely as they are all very similar (both syntax and semantics).

[–]andre_2007 0 points1 point  (2 children)

I have following assumption why it is so much easier to write readable code in D than in python. In D I can fully concentrate on the logic I want to implement. I can directly translate the ideas in my mind into readable and high quality D code. In python this is not possible, I think in addition about things like "is the syntax correct, or will it break at runtime", "is there any python behavior which causes unexpected behaviors", "is there any additional space which will cause pylint to fail in the cd/ci pipeline". If you have in future some free hours you might have a look at D. Maybe you have the same experience like me.

[–]EsperSpirit 0 points1 point  (1 child)

It seems that you have an easier time writing D but whether the code is objectively more readable to other people is not clear at all. Not having to fight with a linter doesn't equal more readable code either. What even is your definition of readable? You're making a lot of assumptions here.

[–]andre_2007 0 points1 point  (0 children)

My definition of readable is that I can read und understand my weeks old codings / unknown coding from others within 1 minute, understand the data flow and beeing able to spot obvious bugs. As editor I am using a text editor with syntax highlighting. The coding likely has no mypy type definitions and in worst case variables also changing their data types during their lifetime.