-
Notifications
You must be signed in to change notification settings - Fork 21
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
Deprecate procedure syntax #7605
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7605?orig=1 |
Tony Sloane (asloane) said: I may be the only one but I use procedure syntax for situations where I do not intend to return anything, reserving the "normal" syntax for places where a value is returned. I personally find a benefit from having the two different syntaxes to indicate these two situations and I haven't experienced any issues or confusions from having both. |
@Ichoran said (edited on Jun 25, 2013 12:11:12 AM UTC): I find it visually useful (more useful than |
@soc said: The issue is that pretty much everyone learning the language falls into the trap of defining a procedure by forgetting the I don't consider saving 5 characters enough of a reason to expose people learning the language to such a frustrating, unnecessary language detail. Just a nitpick: The only type which doesn't return anything is |
Tony Sloane (asloane) said: |
@soc said: |
@adriaanm said: |
- change space 2 indent http://docs.scala-lang.org/style/indentation.html - fix procedure syntax scala/bug#7605
- change space 2 indent http://docs.scala-lang.org/style/indentation.html - fix procedure syntax scala/bug#7605
Ref scala/bug#7605 scala#3076 deprecated the procedure syntax, but only under -Xfuture flag. This deprecates it without it, and drops it under -Xsource:2.14.
new PR to complete the deprecation and pave the way for eventual removal: scala/scala#6325 |
Ref scala/bug#7605 scala#3076 deprecated the procedure syntax, but only under -Xfuture flag. This deprecates it without it, and drops it under -Xsource:2.14.
procedure syntax is deprecated scala/bug#7605
procedure syntax is deprecated scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605 To update the tests, this drops procedure syntax from test/ using ScalaFix ``` $ coursier launch ch.epfl.scala:scalafix-cli_2.12.3:0.5.3 -- -r ProcedureSyntax test $ coursier launch ch.epfl.scala:scalafix-cli_2.12.4:0.5.10 -- -r ExplicitUnit test ```
### What changes were proposed in this pull request? The scala sample code in the quick-start chapter was using deprecated syntax, so this PR has fixed it. ### Why are the changes needed? procedure syntax (SI-7605) is now deprecated, and some editors or IDEs warn against this code. scala/bug#7605 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `SKIP_API=1 bundle exec jekyll build` on local. Closes #42400 from mox692/deprecate_procedure_syntax. Authored-by: mox692 <moymoymox@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
### What changes were proposed in this pull request? The scala sample code in the quick-start chapter was using deprecated syntax, so this PR has fixed it. ### Why are the changes needed? procedure syntax (SI-7605) is now deprecated, and some editors or IDEs warn against this code. scala/bug#7605 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `SKIP_API=1 bundle exec jekyll build` on local. Closes apache#42400 from mox692/deprecate_procedure_syntax. Authored-by: mox692 <moymoymox@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
### What changes were proposed in this pull request? The scala sample code in the quick-start chapter was using deprecated syntax, so this PR has fixed it. ### Why are the changes needed? procedure syntax (SI-7605) is now deprecated, and some editors or IDEs warn against this code. scala/bug#7605 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `SKIP_API=1 bundle exec jekyll build` on local. Closes apache#42400 from mox692/deprecate_procedure_syntax. Authored-by: mox692 <moymoymox@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
The special procedure syntax has been a constant source of trouble and confusion for people learning Scala, while providing no benefit except a few saved characters over using the standard method syntax.
To not cause pointless work for people, this migration has to happen in multiple steps:
Mailing list discussion: https://groups.google.com/d/topic/scala-internals/q1YX7NC1geM/discussion
ScalaDays 2013 Keynote: http://www.parleys.com/play/51c1994ae4b0d38b54f4621b/chapter47
The text was updated successfully, but these errors were encountered: