Re: Visual Studio .NET Verdict? Are People Using C#?
From: *** Bridges (dbridges_at_codecomplete.com)
Date: 03/30/04
- Next message: eXavier: "customized places bar in open dialog"
- Previous message: fungus: "Re: Visual Studio .NET Verdict? Are People Using C#?"
- In reply to: JohnGardnerJr: "Re: Visual Studio .NET Verdict? Are People Using C#?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Mar 2004 21:52:48 -0800
Too bad GC only frees memory. You want a non-dec SRX? Try to close an open
handle when the wrapper goes out of scope. Oops. The cost of GC? Without
a dtor, there's no OnLeaveScope event. If a close() *sequence* is required,
you're screwed.
Translated to C#? Close a SqlCommand then close the Connection. try
{}finally{} comes close but objects created in try{} aren't in the finally{}
scope so they have to be constructed outside the try{}.
C++ (and a few boost libraries) makes life so much more simple.
"JohnGardnerJr" <john.gardner@biotronik.com> wrote in message
news:106gkt5mrfkvu75@corp.supernews.com...
> Why "Resource Acquisiton Is Initialization" (RAII) which is really a topic
> about exception safety, not about fundamental direction of the language or
> its applicability to real-time determinism or do we (I) have the wrong
> acronym?
> Normally when I here of RAII in the context of C++ I think of
Stroustrup's,
> Sutter's comments on exception safety.
>
> It seems like GC (garbage collection) would be the battle of choice???
> And while RAII does similar things, you really have to work at it. And I
am
> not the only one saying this either. Andrei Alexandrescu has made similar
> comments. In that it's a pain to wrap every resource up as class.
>
> So far, for my real-time stuff, GC hasn't been that much of a problem
since
> you can inhibit it during sections of code where you need dedicated
> processing. Granted my stuff isn't that demanding ( I don't have worry
> about anything shorter than a millisecond)
>
> Personally, I think C++ will be replaced by .Net languages for most
Windows
> development in the next few years . My company is already heading in this
> direction. Limitations with .Net haven't been many and we can write code
so
> much faster. In other arenas I believe it will live on much longer.
>
> I think developers get tired of having to deal with so many "gotchas".
You
> really have to deal very carefully with the language ( in the case of C++)
.
> I want to focus on what I am trying to accomplish not on the tool that I
use
> to accomplish it. Sometimes I think the flood of developers to Java is
> cause less by a desire to portability in favor of an easier to use tool.
>
> Regarding Java, I agree that C# and Java are very similar ( I like C# as a
> language better though) but it if you're developing for Windows I think
you
> will get much better performance from C#.
>
> "David Turner" <david@firepro.co.za> wrote in message
> news:1074756833.216249@tanzanite.firepro.co.za...
> > Hi
> >
> > > >
> > > > Finally, I think it's a huge mistake to try to compare C++ and C#.
> > > Despite
> > > > any similarities in the name, they are completely different
languages,
> > > > targeted to completely different tasks. If you want to know more
> about
> > > > this, a good way to start is to search the web for "RAII".
> > >
> > > I don't agree: Of course you should compare them. If you don't know
> about
> > > the differences, how should you decide which one is better suited for
a
> > > specific task?
> > > Maybe you meant that none of the two is really "better" - they have
> > > different strengths and weaknesses, and, as you said, try to solve
> > different
> > > problems.
> >
> > When I said "compare" there, I meant it more in the sense of "saying C++
> and
> > C# are similar". They're surprisingly unsimilar. Sure, the syntax
looks
> > quite similar, but they're on different ends of an ideological split.
> >
> > As I said, a good way to start learning about that split is by reading
up
> on
> > RAII. The executive summary is that C++ is more suitable to tasks that
> are
> > less interactive but have more stringent constraints on timeliness,
> > predictability and robustness.
> >
> > Regards
> > David Turner
> >
> >
>
>
- Next message: eXavier: "customized places bar in open dialog"
- Previous message: fungus: "Re: Visual Studio .NET Verdict? Are People Using C#?"
- In reply to: JohnGardnerJr: "Re: Visual Studio .NET Verdict? Are People Using C#?"
- Messages sorted by: [ date ] [ thread ]