Skip to content

Instantly share code, notes, and snippets.

@maiha
Created November 21, 2010 17:15
Show Gist options
  • Save maiha/708917 to your computer and use it in GitHub Desktop.
Save maiha/708917 to your computer and use it in GitHub Desktop.
Remove Bangs in Actor
class Writer extends Actor {
case class Set(key:String, value:String)
def act {
react {
case s:Set => ...
}
aWriter ! Writer.Set("foo", "1")
class Writer extends Actor {
case class Set(key:String, value:String)
def act {
react {
case s:Set => ...
}
def set(key:String, value:String) = this ! Set(key,value)
}
aWriter.set("foo", "1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment