Yes, sorry, I'm being myopic today. In that case, as a matter of
personal preference, I don't very much like using _1, _2, etc. for
tuples. Extracting values to meaningful variable names seems more
readable. For instance, on line 61, instead of
val msg = lastMessage(u.id)
you could do
val (m, when) = lastMessage(u.id)
and lines 77-78, instead of
case msgs => {
val msg = msgs(0)._1
I would prefer
case (msg, _) :: _ => {
Does that read better?
Vassil
On Thu, Oct 1, 2009 at 12:01 PM, Dave Briccetti <[email protected]> wrote:
> No, the UserView is no longer used for this page. I just deleted part of it.
> I didn’t write anything. The new Scala code is in UserMgr. The video
> explains, and you could probably fast-forward or skip through it.
>
> On Oct 1, 2009, at 1:49 AM, Vassil Dichev wrote:
>
>> Apart from the fact that xml is coded in the UserView, it looks very
>> good. I especially like the pattern to destructure a tuple into vals
>> using case:
>>
>> map{
>> case (m, idx) =>...
>>
>> Quite readable.
>>
>>
>> On Thu, Oct 1, 2009 at 11:16 AM, Dave Briccetti <[email protected]>
>> wrote:
>>>
>>> Patch file and new files (see video for explanation), for review:
>>>
>>> https://issues.apache.org/jira/secure/attachment/12420990/esme-86.zip
>>>
>>>
>
>