-
Notifications
You must be signed in to change notification settings - Fork 21
deprecate DelayedInit outside of App #5479
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5479?orig=1 |
@retronym said: I think it is unlikely we will spec its semantics post-factum; if anything we should deprecated its use outside of |
@adriaanm said: |
@gkossakowski said: I know that this is against Scala's spirit but let's face it: App is a very small feature that is mostly important to people learning and teaching Scala. Let's just deliver this feature in the most useful way to Scala users and move on to more important issues. |
@adriaanm said: |
@adriaanm said: |
Just to be clear, I understand why However, in ScalaFX, the It seems that there are no plans for a replacement feature that works better. I've seen the proposal to use an I think the most obvious solution is to split JFXApp into two classes, one that creates the application and initializes JavaFX, and another (executed on the JavaFX application thread) that is a base class for defining the GUI and its interactions. However, it's not clear to me how we could make this compatible with existing code. Does anyone have any suggestions for an elegant |
@MichaelJAllen, I don't have experience with ScalaFX, but in our experience in Dotty we were able to convert all the usages of DelayedInit into constructor arguments. In the example that you've referred to, could you make The main difference would be that it will not introduce duplicated members & scopes automagically. |
@DarkDimius Thanks for your suggestion! It was the removal of support for I think I see what you're getting at. You pass a function containing the GUI configuration during initialialization to I guess I'll need to think about this some more and try it out, but if I have your concept right, this would break existing code in a number of ways, and it seems that the scoping would complicate matters a lot too. |
new discussion at https://contributors.scala-lang.org/t/scala-3-delayedinit/1902 |
(No description for SI-5479.)
The text was updated successfully, but these errors were encountered: