On Wed, Aug 25, 2010 at 12:43 PM, Ben Schulz <[email protected]> wrote:

> Oh my god, it was an example and supposed to illustrate the hypocrisy
> of the argument. I even added a footnote.
>

Better luck next time. ;)


>
> With kind regards
> Ben
>
> On 25 Aug., 12:22, Kevin Wright <[email protected]> wrote:
> > Scala:
> > val y = Math.max(5,x)
> >
> > Java:
> > final int y = Math.max(5,x)
> >
> > Pretty much the same, except that Java is a tiny bit more verbose, and
> the
> > Java code would need extra maintenance if you wanted to change x to be
> e.g.
> > a double.
> >
> > On 25 August 2010 11:05, Ben Schulz <[email protected]> wrote:
> >
> >
> >
> > > Sure, how about this:
> >
> > > var y = -1; // why the initialization?? so complicated
> > > if(x > 5)
> > >  y = x;
> > > else
> > >  y = 5;
> >
> > > versus
> >
> > > final int y; // ahh, definite assignment, so simple (*)
> > > if (x > 5) {
> > >  y = x;
> > > } else {
> > >  y = 5;
> > > }
> >
> > > Then there's the security aspect.
> >
> > > private[yourscopehere] def getRootAccess() = {
> > >  // this better not be public
> > > }
> >
> > > I'm sure there's more, but I'm also sure the rules are about to shift
> > > in Scala's favor. Again.
> >
> > > With kind regards
> > > Ben
> >
> > > (*) Generally I would list definite assignment as making Java more
> > > complicated, but sine the code is more concise and closer to the
> > > intent....
> >
> > > On 25 Aug., 08:55, Kevin Wright <[email protected]> wrote:
> > > >http://michid.wordpress.com/2010/08/24/so-scala-is-too-complex/
> >
> > > > <http://michid.wordpress.com/2010/08/24/so-scala-is-too-complex/>I'm
> > > > curious, does anyone have an example of the same problem being solved
> in
> > > > both Java and Scala, with Java offering the simplest solution?
> >
> > > > --
> > > > Kevin Wright
> >
> > > > mail/google talk: [email protected]
> > > > wave: [email protected]
> > > > 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]<javaposse%[email protected]>
> <javaposse%[email protected]<javaposse%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/javaposse?hl=en.
> >
> > --
> > Kevin Wright
> >
> > mail/google talk: [email protected]
> > wave: [email protected]
> > 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]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Viktor Klang,
Code Connoisseur
Work:   www.akkasource.com
Code:   github.com/viktorklang
Follow: twitter.com/viktorklang
Read:   klangism.tumblr.com

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