[Lift] Re: Making use of case classes and varargs in Link

2009-11-03 Thread Vesa
Why not with varargs like on below? case class Link(pathParts: String*) and I can say Link(a, b)? - Vesa On 3 marras, 00:15, Jim Barrows jim.barr...@gmail.com wrote: On Mon, Nov 2, 2009 at 1:34 PM, Vesa brut...@gmail.com wrote: You're right about that. You probably wouldn't get very far

[Lift] Re: Making use of case classes and varargs in Link

2009-11-03 Thread David Pollak
On Tue, Nov 3, 2009 at 1:16 AM, Vesa brut...@gmail.com wrote: Why not with varargs like on below? case class Link(pathParts: String*) and I can say Link(a, b)? At this point, we can't overload the object Link.apply method because the compiler will get confused. If this is bothering you

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread Jim Barrows
On Mon, Nov 2, 2009 at 1:15 PM, Vesa brut...@gmail.com wrote: Hi, I was wondering few thing while reading lift examples. Could the Link class be turned into a case class so reading would improve? new Link (a :: b :: nil, false) could be RecursiveLink(a, b) and new Link(a :: b :: Nil) could

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread Vesa
You're right about that. You probably wouldn't get very far without understanding that. I'm still concerned that I have to type unnecessary stuff to express myself without getting any gains in (new Link(a :: b :: nil) vs Link(a, b)) :D - Vesa On 2 marras, 22:27, Jim Barrows

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread David Pollak
On Mon, Nov 2, 2009 at 12:34 PM, Vesa brut...@gmail.com wrote: You're right about that. You probably wouldn't get very far without understanding that. I'm still concerned that I have to type unnecessary stuff to express myself without getting any gains in (new Link(a :: b :: nil) vs Link(a,

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread David Pollak
On Mon, Nov 2, 2009 at 12:27 PM, Jim Barrows jim.barr...@gmail.com wrote: On Mon, Nov 2, 2009 at 1:15 PM, Vesa brut...@gmail.com wrote: Hi, I was wondering few thing while reading lift examples. Could the Link class be turned into a case class so reading would improve? new Link (a :: b

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread Vesa
Also some plain true or false doesn't really explain it's purpose very well and with AbsoluteLink(a, b) I wouldn't have to guess the meaning or look it up from API documentation. - Vesa On 2 marras, 22:34, Vesa brut...@gmail.com wrote: You're right about that. You probably wouldn't get very

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread Timothy Perrett
+1 On 2 Nov 2009, at 20:27, Jim Barrows wrote: Shouldn't the reader already be aware of Scala's list construction, since that is in fact the language we're using? If you think Scala's list construction is difficult to for a new reader, I think explaining a case class would be even more

[Lift] Re: Making use of case classes and varargs in Link

2009-11-02 Thread Jim Barrows
On Mon, Nov 2, 2009 at 1:34 PM, Vesa brut...@gmail.com wrote: You're right about that. You probably wouldn't get very far without understanding that. I'm still concerned that I have to type unnecessary stuff to express myself without getting any gains in (new A comma separated list of