Smart pointers instead of GC?

NoUseForAName no at spam.com
Mon Feb 3 17:48:42 PST 2014


On Tuesday, 4 February 2014 at 00:49:04 UTC, Adam Wilson wrote:
> On Mon, 03 Feb 2014 16:24:52 -0800, NoUseForAName <no at spam.com> 
> wrote:
>
On Tuesday, 4 February 2014 at 00:49:04 UTC, Adam Wilson wrote:
> That may be the case, but StackOverflow shows that ARC hasn't 
> been panacea in Apple land either. Way to many people don't 
> understand ARC and how to use it, and subsequently beg for help 
> understanding heisenleaks and weak references.

Your point? ARC addressed the latency issues, I never said it was 
without challenges of its own.

>ARC places a higher cognitive load on the programmer than a GC 
>does.

Yes, it does. But the whole "not thinking about allocations" 
thing comes at the often unacceptable cost of unresponsive apps.

>And
> Android runs just fine with GC'ed apps, but ARC guys don't want 
> to talk about Google's successes there.

Google's success there is that demanding apps are written using 
the NDK.

> Ahem. Wrong. See: WinForms, WPF, Silverlight. All extremely 
> successful GUI toolkits that are not known for GC related 
> problems.

Silverlight is dead and was an utter failure. WinForms and WPF 
have an uncertain future. Neither has ever been used much in end 
user applications.

I would also like to say that the typical .NET or Java developer 
has lost all sense of what an efficient app feels like. E.g. 
someone who works with Eclipse all day will of course consider 
about everything else lightweight and snappy.

> So that's why nearly every desktop app (for Windows at least, 
> but that's the overwhelming majority) that started development 
> since .NET came out is written C#?

That is simply not true. The set of widely popular Windows 
desktop applications is basically .NET free. However, maybe you 
misunderstood me because - I admit - my phrasing was unclear. 
When I said "desktop" I meant end user desktop applications and 
games. Not enterprise/government desktop CRUD apps which are 
forced upon office workers who cannot reject them because of 
their horrible performance. I would not be surprised if most of 
those are indeed written in .NET (if not written in Java).

> only something like 3% of all apps in the Windows Store are 
> C++/CX.

Does anybody actually use Windows Store? Frankly I do not know 
anyone who does.

> Server apps are written almost universally in .NET languages

Eh.. yes. I said myself that Java and Java-likes rule that domain.

Again, if D wants to compete with Java (or Microsoft's version of 
it) there is nothing wrong with GC.


More information about the Digitalmars-d mailing list