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 ```
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: