[bitc-dev] Accurate static typing vs. Dependent Types

Rodrigo Kumpera kumpera at gmail.com
Mon Dec 8 07:07:27 CST 2008


Declared exceptions in Java sucks because there is no language help to cope
with proper capture and propagation.
Most of the suckiness would go away if, for example, there was a "throw
whatever my body throws" method signature, as only a limited set of methods
actually care about exception handle and want to have a precise exception
list, this is specially true for module internals.

Of course this solution would cause problems with separate compilation
because in Java interfaces are coupled with subtyping and, worse, methods
can't be parametric on their exception list.

Declared exceptions require a kind of sophisticated type system that has
nothing to do with Java's. And, in the end, it only proves that you can't
bolt in features to a type system, even if sound, without thinking about
usability.


On Mon, Dec 8, 2008 at 4:47 AM, Jonathan S. Shapiro <shap at eros-os.com>wrote:

> Because declared exceptions were tried in Java, and were completely
> unusable.
>
> The fact is that you can't omit exception handling code, but exceptions in
> BitC aren't expensive the way they are in C++, because there are no
> destructors to worry about.
>
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20081208/9ff61b03/attachment.html 


More information about the bitc-dev mailing list