Why do you continue to use D?

Dukc ajieskola at gmail.com
Tue Jun 9 12:05:45 UTC 2020


On Wednesday, 3 June 2020 at 11:14:13 UTC, aberba wrote:
> On Wednesday, 3 June 2020 at 11:12:08 UTC, aberba wrote:
>> What are you?
>
> Oops, what about you?

Well, I currently use 2 languages extensively: C# and D. There is 
not really much contest in which of the two is better when 
external factors don't push either choice. D code is easier to 
keep short, easier to modularize and easier to make performant.

Why do I say that D is easier to modularize than C#? Isn't C# 
suppposed to be a scalable language? A good example is D `x.abs` 
versus C# `Math.Abs(x)`. In C#, I can only import stuff for the 
whole file, not just for one function. Also for a static 
function, C# forces he innermost "module" to be a class, so if I 
want to split a class in two, I have to change code calling the 
member functions. In D I can just need to change some imports, 
since the functions would be module-level.

Can't speak whether I'd prefer D over Rust or Nim since I haven't 
used either. I suspect they would be around equal overall.


More information about the Digitalmars-d mailing list