On Thursday, 13 November 2014 at 23:29:42 UTC, ZombineDev wrote:
Well D is still a much better language. I have used C#
professionally for about 2 years and in my opinion it invites
writing over-architected OOP with little regard about
efficiency. My experience is based on working in the code-base
of my old job, reading forums, books and so on.
Just look at these "beautiful" pieces of art:
http://referencesource.microsoft.com/#PresentationFramework/Framework/System/Windows/Controls/DataGrid.cs
^ just try to find were the performance bottleneck is and
refactor it :D
I have an application fetching thousands of rows from an Oracle
database and displaying it under a few ms.
It is fast enough.
If I really need to find a performance bottleneck there lots of
visual profiling tools available.
And some other elegant pieces:
https://github.com/dotnet/corefx/blob/master/src/System.Numerics.Vectors/src/System/Numerics/Register.cs
https://github.com/dotnet/corefx/blob/master/src/System.Numerics.Vectors/src/System/Numerics/Vector.cs
^ Without templates and CTFE the power to weight ratio is
pretty low.
Reflection, dynamic and attributes are also quite powerful
meta-programming capabilities.
As far as I can tell, D code still doesn't explore UDA that much.
Of course there are exceptions to the rule. Here is a somewhat
large, performance oriented project. This an open-source
implementation of the classic C&C RTS games:
https://github.com/OpenRA/OpenRA
I really don't want to go back to .NET. It's not about that
Microsoft is evil, anti-FOSS or anything like that.
I just really like the way D allows me to express my intent and
how flexible it is. It is the overall feeling I get from the
community that people want to use D to write elegant, yet
highly optimal code. And when there is a problem preventing
this (like for some people the GC) a great effort is made to
improve the situation (e.g. http://wiki.dlang.org/DIPs, etc. )
My impression is that the average .net developer is scared by
the "low-level stuff" and wants these stuff to be magically
taken care of. I haven't seen anyone that wants to get rid of
the GC and even fewer are trying to be proactive and to find a
solution (like @nogc, RC strings or exceptions in Dland).
Why should .NET get rid of the GC?
It has quite good performance, better than the one D has, and the
new one will be even better.
Can scale from embedded platforms like Netduino up to Azure scale
cloud deployments for games like Age of Ascent or companies of
Lufthansa scale.
You can use manual memory management in .NET if you really want
to, via struts, unsafe, fixed allocations or just direct calling
Windows APIs via P/Invoke.
What matters is business value from code, not how beautiful it is.
This is why, regardless how primitive Go might be, it is being
picked up by many companies.
It is primitive compared to modern language standards, but
companies see business value in it. Even Microsoft has joined the
party with Azure support for Docker.
Guess in what language the integration is being made?
Also a large portion C# devs are highly dependent on
Microsoft's politics. Like when the development of Silverlight
platform was canceled. It was a huge blow to the .NET community
and there was no solution (even third-party) so everyone just
the left the sinking ship.
You are always dependent on the politics of whoever develops your
tools, regardless of the community or company.
Lots of examples both in commercial and open source worlds.
The only way around it is if you build your complete stack (OS +
language + libraries) yourself.
--
Paulo