🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #75472

Re: Why does Java require the throws clause? Good or bad language design?

#75472
From: Endora
Date: Sun, 11 Mar 2007 01:14
55 lines
3302 bytes
In article <20070208134827.GC5007@morgenes.shire.sytes.net>, Robbert Haarman
<comp.lang.misc@inglorion.net> wrote:
>On Thu, Feb 08, 2007 at 07:52:40AM -0500, Lew wrote:
>> Bent C Dalager wrote:
>> >>And, of course,
>> >>public void foo(Object... args) throws Throwable
>> >>may be just the silver bullet we are looking for . . .
>>
>> Robbert Haarman wrote:
>> >In the end, you get the worst of
>> >dynamic typing and the worst of mandatory declarations, all in one
>> >program.
>>
>> Which is why newsgroup readers have to watch out for humorous replies, and
>> not try actually to implement them.
>
>Point taken.
>
>On the other hand, people do actually write code like that. Well.
>perhaps not "throws Throwable", but certainly "throws Exception".

Not much different from throws Throwable
as you loose any and all the precision.
Basically, your program is screwed beyond repair
and the entire exceptions mechanism needs to be redesigned.

>And
>anyone who has been programming in Java for some time will have seen the
>likes of
>
>void add(Object o) ...
>
>and
>
>((SomeClass) someContainer.get(someKey)).someMethod(...)
>
>It's not just misguided programmers that write such code; Java was full
>of it before the type system overhaul.
>
>Regards,
>
>Bob
>




- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Many of the punditry -- of course, not you (laughter) --
but other punditry were quick to say,
no one is going to follow the United States of America.

--- Adolph Bush,
    "Washington, D.C., Jan. 21, 2003
Technical Details
Message-ID: <EB024D1D.FCFB8EB3@netscape.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!novia!volia.net!news2.volia.net!news.ntu-kpi.kiev.ua!news.uran.net.ua!news1.lucky.net!carrier.kiev.ua!news.te.net.ua!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!130.81.64.211.MISMATCH!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny04.POSTED!760c3fd9!juno.com!draconian
References: <1170835862.972715.24740@v33g2000cwv.googlegroups.com> <45c9a593$0$765$5a6aecb4@news.aaisp.net.uk> <gcudnTZig-sMTFTYnZ2dnUVZ_uGjnZ2d@comcast.com> <eqeuu2$tec$1@orkan.itea.ntnu.no> <20070208111322.GB5007@morgenes.shire.sytes.net> <edCdnWnpjsCLgFbYnZ2dnUVZ_vDinZ2d@comcast.com> <20070208134827.GC5007@morgenes.shire.sytes.net>

Show Full Headers
Complete Article Headers
Message-ID: <EB024D1D.FCFB8EB3@netscape.net>
Subject: Re: Why does Java require the throws clause? Good or bad language design?
Date: Sun, 11 Mar 2007 01:14:32 GMT
From: Endora <draconian@juno.com>
References: <1170835862.972715.24740@v33g2000cwv.googlegroups.com> <45c9a593$0$765$5a6aecb4@news.aaisp.net.uk> <gcudnTZig-sMTFTYnZ2dnUVZ_uGjnZ2d@comcast.com> <eqeuu2$tec$1@orkan.itea.ntnu.no> <20070208111322.GB5007@morgenes.shire.sytes.net> <edCdnWnpjsCLgFbYnZ2dnUVZ_vDinZ2d@comcast.com> <20070208134827.GC5007@morgenes.shire.sytes.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!novia!volia.net!news2.volia.net!news.ntu-kpi.kiev.ua!news.uran.net.ua!news1.lucky.net!carrier.kiev.ua!news.te.net.ua!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!130.81.64.211.MISMATCH!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny04.POSTED!760c3fd9!juno.com!draconian
Newsgroups: news.groups, alt.slack, alt.config, news.software.nntp, alt.usenet.kooks
 alt.usenet.kooks
Organization: Fun of Killing in Virtual Domain
Lines: 55
NNTP-Posting-Host: d31-75.tenet.odessa.ua
X-Trace: toster.te.net.ua 1173596539 16000 195.138.75.31 (11 Mar 2007 07:02:19
 GMT)
X-Complaints-To: abuse@te.net.ua
NNTP-Posting-Date: Sun, 11 Mar 2007 07:02:19 +0000 (UTC)
X-Newsreader: Microsoft Outlook Express 4.72.3110.1