Thread View: news.software.nntp
1 messages
1 total messages
Started by Endora
Sun, 11 Mar 2007 01:14
Re: Why does Java require the throws clause? Good or bad language design?
Author: Endora
Date: Sun, 11 Mar 2007 01:14
Date: Sun, 11 Mar 2007 01:14
55 lines
3302 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads