56.9 F
Los Angeles
Friday, November 15, 2024

Trump Lawyer Resigns One Day Before Trial To Begin

Joseph Tacopina has filed with the courts that he will not represent Donald J. Trump. The E. Jean Carroll civil case is schedule to begin Tuesday January 16,...

Judge Lewis A. Kaplan Issues Order RE Postponement

On May 9, 2023, a jury found Donald J. Trump liable for sexual assault and defamation. The jury awarded Ms. Carroll $5 million in damages. Seven months ago,...

ASUS Announces 2023 Vivobook Classic Series

On April 7, 2023, ASUS introduced five new models in the 2023 Vivobook Classic series of laptops. The top laptops in the series use the 13th Gen Intel® Core™...
TechnologyProgrammingIs C# filled with garbage?

Is C# filled with garbage?

Bryan takes on C#’s implementation of garbage collection. I know I’ve read posts from various Microsoft-bloggers defending the architecture, but I can’t recall why they claim the approach was necessary.

Bryan keeps reminding me that awkwardly designed technologies often invite more awkward technologies to patch them up. Is this the fate of C#’s garbage collection?

Loren
Lorenhttp://www.lorenheiny.com
Loren Heiny (1961 - 2010) was a software developer and author of several computer language textbooks. He graduated from Arizona State University in computer science. His first love was robotics.

Latest news

Related news

  1. As someone coming from c++ to c#, I have to say that Bryan seems to be suffering from the same blinders I had — Its NOT really about memory management.

    Sure, memory isn’t freed right away – but it is freed and allocated efficiently and when needed. (if memory pressure is growing, generation size is getting large, etc).

    The issues ARE about resource management. c++ wrapped object management, memory management, and resource management all into one package. It was hard to get right (it seemed manageable, but look at any application of significant size to see that there were mistakes made). But it gave you the tools to solve the problems.

    C# removes memory management from your concern, and does a great job with it. Really it does.. But it makes *resource* management a concern and removes a tool c++ gave us — deterministic destructors. [By resource management I mean things like sql connections, GDI handles, file handles, etc.]

    Once you realize this, you start *using* the tools c# gives you to solve the issues instead of *cursing* them. And you find that you traded a big problem set for a different (but smaller) problem set. You quit assuming that a GC is supposed to remove all your responsibilities and realize that you’re still in charge of making your applications correct.

    C# is simply more productive than C++. It’s not as fast, execution-wise. It’s not as “bare metal”. But to use Bryan’s arguments, quit using just one general-case solution all the time. You don’t need the control (and responsibility) C++ gives you for everything… use c# when you can, and C++ when you must and you’ll get a lot more done in less time.

    All languages / tools so far have had flaws, and you’re right, almost all of them develop “cruft” to patch up the flaws. I’m sure c# will, too (just like c++). I’ll quit using it as soon as it’s the wrong solution to my problem. (I hope I quit – I’d much rather be practical than emotional)