OT: C# now has ref and const ref return

Manu turkeyman at gmail.com
Tue Aug 6 21:31:21 UTC 2019


On Tue, Aug 6, 2019 at 5:01 AM Bert via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Tuesday, 6 August 2019 at 09:54:49 UTC, XavierAP wrote:
> > https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ref#reference-return-values
> >
> > This is a good example how C# is getting very competitive not
> > only on the high-productivity segment (which Dlang currently
> > neglects relatively), but expanding into higher performance.
> > The only point of these new features is to enable writing C#
> > code that does not allocate in the GCed heap. I think D should
> > pay attention
> >
> > See also:
> > https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ref#ref-struct-types
> >
> > Syntactical design-wise they have opted for total explicitness.
> > Everything has to be decorated ref: function declaration,
> > return statement, and local variable declaration at caller
> > scope. (This makes it look at first like it's allowing ref
> > local variable declarations like C++, but I understand --
> > haven't played with it yet -- that in reality it's only allowed
> > at the left side of calls to ref return methods.) I guess this
> > explicit approach may be safer and works for C# since it by
> > design doesn't have templates/heterogeneous generics, but
> > polymorphic/homogeneous.
> >
> > Note in case you're not familiar that C# readonly means D
> > immutable and C# const means D enum.
>
> Eventually D will not be competitive at all. Simple as that.
> These other languages are always moving forward in all
> directions. D inches along in a few. It's just a matter of time.
> D is about 20 years too late and the "leadership" is more
> concerned with conferences and "swag" than getting D competitive.
> Computation is expanding in all domains. Programming is not just
> about writing device drivers or controlling relays any more...
> Without proper user support tooling D will fail. It's just a
> matter of time. Just like a biological population there is a
> requirement of a certain minimum number of users to sustain D.
> The D downloads is touted as "Look, the number of downloads are
> growing, it means D is growing!! D is on the right track!"... but
> yet 1. The number of humans getting in to computing is growing
> and 2. The actual users of D are not growing in step. People
> download D, try it, and realize it sucks and it's not for them.
> Sure a few love D, they see the beauty of it and ignore or
> neglect the other issues.
>
> I'm about 10x as productive in other languages than D. It's not
> the language itself as it is everything around it. It's great for
> minor things like utilities or simple one offs but few in the
> right mind will use D for anything major(as a serious massive app
> targeted as the real public).
>
> I imagine D will simply become a support language that can be
> used to write certain things well in and then eventually some
> other better language with better support will come along and
> replace D. That is the direction D is headed and the leadership
> refuses to accept it. They keep looking at the pros of D and
> completely ignore the cons.... eventually the cons will catch up
> and overtake the pros and then it's just a matter of time. The
> leadership is myopic and that what is killing D... and it's
> probably too late to save it. They are stuck in the past and
> entropy will do what it always does and at some point it will be
> more trouble to keep D alive than it will to just move on. Sure
> there will always be a few hanger ons but that will be the future
> of D it seems.

I feel your sentiment, but I think you're wrong about some outcomes.
D is limited by developer manpower. It's not clear how to improve that.
I've been banging on and on and on and on about developer experience
for a very long time, and it is actually moving, but it's
under-staffed.
VisualD is actually a very good tool, but with some gaps. Compared to
any other language integration into Visual Studio, I don't know of
many experiences better than VisualD.
VisualD is 1-man, and if there were 2, I think it would make a world
of difference... so reasonably progress is happening, just not at an
enjoyable rate.

Now your end-game though, I think that's a bit un-realistic. I expect,
the moment that a substantial number of the D users feel like things
are going in a completely wrong direction, or their progress is being
inhibited behind a threshold that's unacceptable, D will fork.
D exists because it's not as bad as you say, and the day that it
becomes as bad as you say, it will fork... that fork under new
leadership may see some rapid progress initially, but it's understood
that the integrity of the community is a balancing factor against that
progress.
It's hard to say exactly where that balance is, but I'm fairly
confident it exists, and as soon as the threshold is crossed, it will
fork. We haven't forked because D is not currently as bad as you say.


More information about the Digitalmars-d mailing list