I am wondering what is the idiomatic way to express similar messages (value objects) 
Let's say I have some messages that I want to send : UserEnter, UserLeft, UserSendGreeting etc'. I hope that the following can express my dilemma

there are two options that I think one can express it :

```
trait UserAction
case class UserEnter (username:String,hour:Long,day:WeekDay,room:Int)
case class UserLeft (username:String,hour:Long,day:WeekDay,room:Int)
case class UserSendGreeting (username:String,,hour:Long,day:WeekDay,greeting:String)

def foo(userActions:List[UserAction]) = {
userActions match {
case UserEnter(userName)::tail =>
sendWelcomeMessage(userName)
handleOtherActions(tail) 

case UserLeft::tail => "must enter first"
case _ => "do something else"
}

```

another way is :

```
    trait Action
    case class Enter(room:Int) extends Action
    case object Left(room:Int) extends Action
    case object Greet(msg:String) extends Action

    case class UserAction(username:String,action:Action,,hour:Long,day:WeekDay)

    def foo(userActions:List[UserAction]) = {
    userActions match {
    case head::tail if head.action == Enter =>
    sendWelcomeMessage(head.userName)    
    handleOtherActions(tail)             
    case head::tail if head.action == Left => "must enter first"
    case _ => "do something else"
    }

```

The 1st option is more explicit and easier to pattern match but more repetitive code. 
The other one is more explicit on the action itself but pattern match is more verbose  

which way is better ?