January 27, 2006
> I'll propose that an IDE could trace the call-tree(s) and provide that information; perhaps on the fly. One might use the open-source D front-end to help implement such a system?
This thought had occurred to me, and it's certainly high on my list. However, a throw spec would be better performance wise and more explicit.



January 27, 2006
nick wrote:
>> I'll propose that an IDE could trace the call-tree(s) and provide that information; perhaps on the fly. One might use the open-source D front-end to help implement such a system?
> 
> This thought had occurred to me, and it's certainly high on my list. However, a throw spec would be better performance wise and more explicit.
> 
> 
> 
If your suggestion is a *required* throws declaration, I will disagree.  This clutters up Java to an inane degree and hasn't pointedly helped me in any obvious way.

-DavidM
January 27, 2006
On 2006-01-27 04:47:24 -0800, David Medlock <noone@nowhere.com> said:

> nick wrote:
>>> I'll propose that an IDE could trace the call-tree(s) and provide that information; perhaps on the fly. One might use the open-source D front-end to help implement such a system?
>> 
>> This thought had occurred to me, and it's certainly high on my list. However, a throw spec would be better performance wise and more explicit.
>> 
>> 
>> 
> If your suggestion is a *required* throws declaration, I will disagree.   This clutters up Java to an inane degree and hasn't pointedly helped me in any obvious way.
> 
> -DavidM

Throws declarations are good because they let you know (1)what is being thrown and (2)check that you catch it.
Throws declarations are bad because they are too strict and maintenance heavy. People dismiss them and this results in worse bugs.

A solution would be an automatic on-demand system that gives you all the same features as throws declarations without getting in your way all the time.

January 28, 2006
nick wrote:
> On 2006-01-27 04:47:24 -0800, David Medlock <noone@nowhere.com> said:
>  (...)
> A solution would be an automatic on-demand system that gives you all the same features as throws declarations without getting in your way all the time.
> 

A lint program for D?
January 29, 2006
Julio César Carrascal Urquijo wrote:
> nick wrote:
>> On 2006-01-27 04:47:24 -0800, David Medlock <noone@nowhere.com> said:
>>  (...)
>> A solution would be an automatic on-demand system that gives you all the same features as throws declarations without getting in your way all the time.
>>
> 
> A lint program for D?
Basically, yeah. And in addition and IDE feature which brings up a list of exceptions that a function can throw (this can possibly be read out of the docs for libraries, since the source may not be available).
January 29, 2006
nick wrote:
> Keeping it brief:
> 
> Shouldn't exception catching be mandatory as in Java?
> 
> If not, then shouldn't functions/methods still have a throws keyword so coders know what to catch?
> 
> Sorry if this has already been discussed.
> 

I think the majority of Java programmers (myself included) find checked exceptions to be quite a bad feature. I think this opinion is even becoming a general consensus, even though that won't make the Java language change now (as they are pious about backwards compatibility).


> Shouldn't languages target those who want to write clean, workable code?

Yes, they should, but you are forgeting about the other important aspect: productivity. The problem here, is that while checked exceptions improve code readability, they diminuish coding productivity. The issue then becomes if one thinks the advantadge outweights the disadvantage or not.
I think it clearly doesn't, like I said before.
Imagine the following scenario:
Documenting code is a good pratice right? Now imagine a language feature that required that all functions and datatypes had to be documented, or else the code wouldn't compile. Would that be a good feature to have? And would you write *correct* documentation (and not empty statements), every time you wanted to compile the program? *g*



-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
January 29, 2006
"nick" <nick.atamas@gmail.com> wrote in message news:dr9t6o$gnl$1@digitaldaemon.com...
> Shouldn't exception catching be mandatory as in Java?
>
> If not, then shouldn't functions/methods still have a throws keyword so coders know what to catch?

I found Bruce Eckel's arguments on this point to be convincing:

http://www.mindview.net/Etc/Discussions/CheckedExceptions


1 2 3
Next ›   Last »