On 13 October 2010 06:36, Ben Schulz <[email protected]> wrote: > (I did not want to take over the other thread as I don't believe using > Scala case classes from Java is a solution to the posed problem.) >
Hey! Using Scala solves everything, including world hunger, cheap stable nuclear fusion, the mass of the Higgs Boson and the cure to AIDS! You know I truly believe that, right? :) > I've dabbled in Scala a bit but so far I've stayed away from using > named constructor parameters because it seems there is no way to > override the getters/setters later. Is that wrong? > No, it's not wrong. Named parameters are resolved at compile-time, making them part of the API. So long as you're trying to do something sane, there's very likely a pattern to make it possible. It would help to know your use-case. > What I do right now is make the parameter private, rename it and add > another property with the original name. That breaks any clients > relying on that name though. How do I get around that? I really want > to use those copy methods. > The was some talk a while back about being able to alias named params. IIRC, the demand wasn't there and nothing came of it, but it can be added easily enough if a more pressing need arises > With kind regards > Ben > -- 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.
