Vision document for H1 2018
Dukc
ajieskola at gmail.com
Thu Mar 15 17:17:47 UTC 2018
On Sunday, 11 March 2018 at 07:59:53 UTC, rumbu wrote:
> My opinion is that the day when C# will compile to native (on
> any platform), the C# developer interest in D will drop
> instantly.
I do write a commerical project in C#. But I have an opposite
feeling: The day D will easily compile to Javascript and be able
to fully interface with it, my wish to use C# will drop pretty
much instantly. I'm not even sure I would choose C# over -BetterC
D!
It can already compile to Javascript using LDC/Emscripten, which
is impressive, but you cannot interface with its strings and
classes without glue code, except perhaps with some trickery. I
have already tried doing some but so far for no avail.
And that's not to say that C# would be a bad language. I didn't
hesistate to pick it over writing Javascript directly, and I
don't think Java or Python would be superior for my tastes
either. But it still isn't even a close match against D.
First, C# feels like it's hiding details from me, it kind of
wants to maintain an ivory tower illusion. It's very hard, if
possible at all, to control memory management. Libraries often
feel like they're dependant on IDE (Visual Studio), not just the
language.
Second, iterating in C# feels last-century standard. I like LINQ,
but it still is like Phobos with only forward ranges, strange
names and no thought put on avoiding needless heap allocations.
And it's foreach loop can't iterate by ref, which means I often
tend to iterate as if I was using C.
Third, expressive power suffers alot from lack of powerful
templates, Voldemort types and var keyword being much more
constrained in use than auto.
More information about the Digitalmars-d-announce
mailing list