2011/3/27 Cédric Beust ♔ <[email protected]>

>
>
> On Sun, Mar 27, 2011 at 10:37 AM, Josh Berry <[email protected]> wrote:
>
>> The problem is framed in such a way that you think you can prevent
>> programmers from doing stupid things with checked exceptions.  I'm
>> more interested in designs that promote productive ideas than I am
>> ones that supposedly protect from bad ones.
>>
>
> Phrasing these two things as mutually exclusive sounds fallacious to me.
>
> You enjoy functionalities that protect you from bad things on a regular
> basis in Java, to the point that you probably don't even remember they're
> there (no pointer arithmetics, bound checking, garbage collection, etc...).
>
> A good language will strive to provide support in both directions:
> promoting good practices while protecting developers from mistakes that can
> be easily detected or (even avoided altogether) by tools.
>
>
Got it in one.  Much of modern programming revolves around features to
protect us.  Whether it's Java's GC protecting us from pointer screwups,
true array and string objects protecting us from buffer overflows, actors
protecting us from tricky locking considerations, final variables protecting
us from unexpected mutations, type systems protecting us from mixing
incompatible values or Haskel's monadic comprehensions protecting us from
side effects.

Protection isn't the issue here, protection is a good thing!  The problem is
when that protection gets so patronizing and burdonesome that a significant
number of developers find themselves working around it.  Such workarounds
are invariably less safe than the approach that would be used if the
protection hadn't existed in the first place (i.e. swallowing an exception
you were forced to trap instead of letting it bubble).

Checked exceptions are unsafe because they often force you into a position
of having *less* protection, and so are counterproductive.  I campaign for
their removal because I want back the safety that they force me to drop.



> --
> Cédric
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>



-- 
Kevin Wright

gtalk / msn : [email protected]
<[email protected]>mail: [email protected]
vibe / skype: kev.lee.wright
quora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not
regard them as "lines produced" but as "lines spent": the current
conventional wisdom is so foolish as to book that count on the wrong side of
the ledger" ~ Dijkstra

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to