Exactly... shorter is safer, compare:

Assembly - Many lines, almost any error can occur, including a seg fault
and/or memory leak
Old Java - 5 lines, possible off-by-one error
New Java - 4 lines, off-by-one is no longer possible
Haskell - 1 (short) line - also removes the risk of NullPointerException and
ConcurrentModificationException

On 24 October 2010 18:16, Josh Berry <[email protected]> wrote:

> 2010/10/24 Cédric Beust ♔ <[email protected]>:
> > How about running this thought experiment on two high level languages,
> one
> > which requires 3 lines of code and one which requires 1?
> > The answer is much less clear cut in this case.
>
> You can do the exact same thought experiment completely in Java.
> Which is more likely to get wrong, the for/each loop, or a traditional
> for loop?  :)
>
> Does this mean that one is perfect?  Of course not.  Errors can always
> exist.
>
> --
> 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]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Kevin Wright

mail / gtalk / msn : [email protected]
pulse / skype: kev.lee.wright
twitter: @thecoda

-- 
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