Change net.liftweb.mapper.ByList to take a Seq[T] instead of a List[T]?

16 views
Skip to first unread message

harryh

unread,
Sep 30, 2009, 3:27:30 PM9/30/09
to Lift
Subject says it all. Is there any reason why this should not be done?

-harryh

David Pollak

unread,
Sep 30, 2009, 4:19:38 PM9/30/09
to lif...@googlegroups.com
Why?

We're going to have to turn it into a List under the covers anyway, so it's a performance wash.

I'm not opposed to it, but want to understand.


On Wed, Sep 30, 2009 at 12:27 PM, harryh <har...@gmail.com> wrote:

Subject says it all.  Is there any reason why this should not be done?

-harryh





--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

harryh

unread,
Sep 30, 2009, 4:35:27 PM9/30/09
to Lift
> We're going to have to turn it into a List under the covers anyway, so it's
> a performance wash.

Taking a look at the code it does no appear to be the case that it
will have to be turned into a List under the covers. It's just mapped
over and then mkStringed.

-harryh

David Pollak

unread,
Sep 30, 2009, 5:32:53 PM9/30/09
to lif...@googlegroups.com
My mistake on the mkString (I didn't think it was on Seq).

But why?
 

-harryh


harryh

unread,
Sep 30, 2009, 5:54:46 PM9/30/09
to Lift
> But why?

It's a very very small issue (obviously), but I happened to have a Seq
[Long] at one point in my code and I had to convert it to a List when
using it with ByList. Only 7 extra characters in my code, but it does
seem like, in general it's good for API level code to accept the most
general type that is reasonable.

-harryh

David Pollak

unread,
Sep 30, 2009, 5:55:56 PM9/30/09
to lif...@googlegroups.com
okay. open a ticket.

Xavi Ramirez

unread,
Sep 30, 2009, 8:13:39 PM9/30/09
to lif...@googlegroups.com
It also adheres nicely with the "general inputs and strict output" idiom.
Reply all
Reply to author
Forward
0 new messages