Article View: borland.public.csharpbuilder.language.csharp
Article #633Re: try catch question
From: Rudy Velthuis [TeamB]
Date: Mon, 19 Jul 2004 11:54
Date: Mon, 19 Jul 2004 11:54
29 lines
2574 bytes
2574 bytes
At 13:34:01, 19.07.2004, Marc Rohloff [TeamB] wrote: > On Mon, 19 Jul 2004 12:57:58 +0200, Rudy Velthuis [TeamB] wrote: > > > So, we know that because it is documented and because we can see the > > source. But that is an implementation detail. I personally would never > > rely on such a detail. IOW, I simply wouldn't make an exception for > > StreamWriter.Close(). > > Without trying to be facetious. Doesn't all code rely on > implementation details? Yes. But once someone writes a StreamWriter derivate which does something additional in Close() (even if it is just logging something, for instance), you'll have a problem. And there is nothing in the description of StreamWriter.Close() that would prevent this, AFAICS. The whole idea of virtual functions is that they can be overridden and *enhanced*. Sorry, but it may look like being pedantic, but I think one should generally not do that, and I wouldn't make an exception for this case, where we know the exact type. It would not be easily maintainable and enhanceable, IMO. -- Rudy Velthuis [TeamB] "Well done is better than well said." -- Benjamin Franklin (1706-1790)
Technical Details
Message-ID:
<xn0dkyg9n3d03000n-moderator@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40f3748e@newsgroups.borland.com> <40F380DB.819CE161@midnightbeach.com> <40f934bb$1@newsgroups.borland.com> <s3am1jplg0p9$.dlg@marcrohloff.40tude.net> <is0jf0l76g610ajlns5154ij25vantsvp6@4ax.com> <xn0dkx9y9ftcjf013-moderator@newsgroups.borland.com> <40faddbc$1@newsgroups.borland.com> <xn0dkyerh1bs6700c-moderator@newsgroups.borland.com> <iw4h7deon4y4$.dlg@marcrohloff.40tude.net>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,f80ee75cfac101b9
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Rudy Velthuis [TeamB]" <velthuis@gmail.com>
Subject: Re: try catch question
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <40f3748e@newsgroups.borland.com> <40F380DB.819CE161@midnightbeach.com> <40f934bb$1@newsgroups.borland.com> <s3am1jplg0p9$.dlg@marcrohloff.40tude.net> <is0jf0l76g610ajlns5154ij25vantsvp6@4ax.com> <xn0dkx9y9ftcjf013-moderator@newsgroups.borland.com> <40faddbc$1@newsgroups.borland.com> <xn0dkyerh1bs6700c-moderator@newsgroups.borland.com> <iw4h7deon4y4$.dlg@marcrohloff.40tude.net>
Organization: TeamB
User-Agent: XanaNews/1.16.3.1
Date: Mon, 19 Jul 2004 13:54:54 +0200
Message-ID: <xn0dkyg9n3d03000n-moderator@newsgroups.borland.com>
X-Realname: Rudy Velthuis (TeamB)
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr
p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
X-Ref: newsgroups.borland.com ~XNS:00003FB0
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.93.139.248
X-Trace: newsgroups.borland.com 1090237808 217.93.139.248 (19 Jul 2004 04:50:08 -0700)
Lines: 29
X-Authenticated-User: rvelthuis
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail