Re:D as a Better C
by fithisux on Wednesday August 23, 2017 @03:14PM
(#15084259)
Now we need another flag to enable a better Java mode. By default D is in better C++ mode.
[ Parent
| on HN ]
How about betterC# instead? Given that C++/CLR is a thing, I imagine that it would be possible to get D working on it. JVM is a bit more limited in what it allows vs. CLR. For instance, C# has the unsafe keyword that allows pointer arithmetic, which would correspond to @system in D. @safe D would correspond to the normal C# behavior on that front.
Probably a lot of work though and I'm not sure why anybody would bother.
D already is and has been (better C#) when taken as a language. No need for a command line flag.
Microsoft is.
That is why .NET Native and CoreRT exist.
.NET 4.6 got a few news ways to control when the GC is allowed to run.
Also C# got its reference types improved on version 7, and the roadmap up to 8.0 includes a few more goodies, like spans.