I was just updating some code and needed to make it more modular less
coupled, and would have been ideal for a simple closure, and whilst adding a
nicely named interface wasn't that much overhead in this instance, the
thought struck me that with all these small interfaces, the code felt a lot
more
I've found that most of the times when I can't think of a name it is because
the design was stupid to begin with. After refactoring the design a good
name is usually obvious.
BR,
John
On Tue, Dec 23, 2008 at 1:00 AM, Michael Neale wrote:
>
> I think people underestimate the metal effort required
I think people underestimate the metal effort required to come up with
a name for something. You stop - pause, and think, then try out a few
names, then get grumpy cause you are crap at naming, and are generally
less productive for the rest of the day while your subconscious thinks
up a better nam
On Sun, Dec 21, 2008 at 9:41 PM, Jan Goyvaerts wrote:
> What I am curious about is where Scala is obviously better than Java in
> developing certain (parts of) applications.
Designing API's. Scala gives the API designer much more power to ensure safe
usage and minimize boilerplate. Some of it is
One of the reasons I want tuples is for a lot of the time I can't be arsed
trying to think up a suitable, non-stupid, locally appropriate classname,
way too often I seem to have CustomerAndInvoiceContainer when
(Customer,Invoice) would suffice.
On Mon, Dec 22, 2008 at 2:58 AM, John Nilsson wrote:
On Sun, Dec 21, 2008 at 4:43 PM, James Iry wrote:
> What you'll generally find is that when you just need a simple carrier
> for 2 or 3 values you'll probably be drawn to a tuple. When you need
> many more values than that, or when you want to carry around
> operations that work on them, or when
On Dec 21, 12:29 pm, "Jan Goyvaerts" wrote:
> It's the simplified syntax then... This is certainly nice to quickly create
> a hierarchy of DTO classes. The problem though is that this kind of
> declaration doesn't allow for additional properties/methods to be defined in
> the subclasses. Or does
Don't get me wrong - I'm not challenging anyone here to prove Scala is
useful. :-)
It certainly is. It certainly does some things better than Java. And looking
to your list of preferences I would say I still have plenty to read about...
What I am curious about is where Scala is obviously better th
It's the simplified syntax then... This is certainly nice to quickly create
a hierarchy of DTO classes. The problem though is that this kind of
declaration doesn't allow for additional properties/methods to be defined in
the subclasses. Or does it ?
Anyone tried some ORM implementation yet, btw ?
On Dec 21, 5:58 am, "John Nilsson" wrote:
> I was just about to ask you when a tuple would be better than a class.
I can answer that question by drawing a parallel. When you write a
method in Java, you have a range of options for its arguments.
At one end of the range is
public void foo(Typ
On Sun, Dec 21, 2008 at 4:14 AM, James Iry wrote:
> scala> val (minors, adults) = people partition {_.age < 18}
>
> minors: List[Person] = List(Person(Toby,12))
> adults: List[Person] = List(Person(Bob,28), Person(Sarah,42))
I was just about to ask you when a tuple would be better than a cl
First let me say that when I use Scala, what I miss from Java is the
richness of the tool support. Also, Scala has some limitations in the
kinds of annotations it can do. But that's about it, and both are
being worked on actively.
What I like in Scala over Java, in no particular order:
Type in
the class declaration syntax.
sealed abstract class A
case class B(val foo:Int) extends A
case class CB(val foo:Int, val bar:String) extends B(foo)
case class D(val foo:Int) extends A
(The above code declares a class hierarchy of four classes each having a
constructor matching the declaration abo
13 matches
Mail list logo