Some thoughts and an idea about Checked Exceptions

Archie Cobbs archie.cobbs at gmail.com
Sun Dec 3 17:22:56 UTC 2023


On Sun, Dec 3, 2023 at 11:01 AM David Alayachew <davidalayachew at gmail.com>
wrote:

> Here are some thoughts I had about Checked Exceptions, plus an idea.
>

Some random thoughts/opinions on this idea...

Let's take the big picture view. Writing Java source code is basically a
serialization exercise: in your head you have some complicated, tree-like
control flow & logic data structure but to express that in Java you have to
convert it into a linear sequence of UTF-16 codes.

So in a sense the real "problem" you are addressing is that we're trying to
jam a tree/graph data structure into a linear sequence. As a result,
there's never going to be a "pretty" way to do it, only different ways of
doing it adequately.

In other words, the best we can hope for is something well-defined and
unambiguous that everyone can understand and agree on, and then get on with
our lives. And that's what we already have.

Could the Java language be "compressed" in various ways so that we have to
type fewer characters? Yes! There are lots of ways to do that, including
your suggestion. Another idea is that we could replace "class",
"interface", and "protected' with "cls", "infc", and "prtd". But where do
you stop? And what is your criteria for stopping?

The philosophy behind the design of Java (as far as I can infer it) is to
prioritize logical clarity, not brevity. So we stop when we get something
that is reasonably adequate.

As has been said before: "If what you want is a language for algorithm
compression, try Perl" :)

-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20231203/8b5fa1b5/attachment-0001.htm>


More information about the amber-dev mailing list