Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scala-swing should cull its residual references to scala-actors #6641

Closed
scabug opened this issue Nov 9, 2012 · 7 comments
Closed

scala-swing should cull its residual references to scala-actors #6641

scabug opened this issue Nov 9, 2012 · 7 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Nov 9, 2012

See: https://issues.scala-lang.org/browse/SI-6640?focusedCommentId=60822&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-60822

Here there are:

package scala.swing

import scala.actors._

object SwingWorker {

}

abstract class SwingWorker extends Actor {
  def queue() {

  }

  def done() {

  }

  private var _cancelled = false
  def cancelled: Boolean = _cancelled
  def cancelled_=(b: Boolean) { _cancelled = b }
}
package scala.swing

import scala.actors._

// Dummy to keep ant from recompiling on every run.
trait SwingActor { }
@scabug
Copy link
Author

@scabug scabug commented Nov 9, 2012

@scabug
Copy link
Author

@scabug scabug commented Nov 9, 2012

@scabug
Copy link
Author

@scabug scabug commented Nov 9, 2012

@som-snytt said (edited on Nov 10, 2012 4:14:24 PM UTC):
Someone asked a question about Swing on SO so I had to cull old code. The second thing I wrote in Scala was a Scala SwingWorker. I don't know if it's pointless at this point (and maybe that point, too). But I could improve/upgrade it from old Future to new Future.

git://github.com/som-snytt/scala-swing-support.git

I was trying to remember whether, when you cull something, you keep it or discard it. Apparently, cull is collect, but a cull is a discard. It's too bad there isn't a collections framework method named cull, perhaps that would somehow work slightly differently from partition. That would be fun. cull would return one set, culls the other.

Update: dictionary example: cull the best passages from the poet's work. These examples were culled from the compiler code base.

@scabug
Copy link
Author

@scabug scabug commented Nov 10, 2012

@retronym said (edited on Nov 10, 2012 7:51:12 AM UTC):
My interpretation of the word is to "round up and exterminate." I'd code it in a hybrid functional/imperative manner:

def cull[A](as: Seq[A], cond: A => Boolean, action: A => Unit): Seq[A] =
  val (theUnlucky, theLucky) = as partition cond
  theUnlucky foreach action
  theLucky
}

Stay tuned for an easier-to-contribute-to incarnation of scala-swing post 2.10.0.

@scabug
Copy link
Author

@scabug scabug commented Dec 19, 2012

@dcsobral said:
Unless Scala Actors are going to be still around with 2.11, this must be deprecated on 2.10.x.

As for undocumented, etc, etc, I've found another program using it.

@scabug
Copy link
Author

@scabug scabug commented Jan 8, 2013

@scabug
Copy link
Author

@scabug scabug commented Jan 12, 2013

@retronym said:
Deprecated in 2.10.1, removed in 2.11.0-M2.

@scabug scabug closed this Jan 12, 2013
@scabug scabug added the has PR label Apr 7, 2017
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants