docs.scala-lang icon indicating copy to clipboard operation
docs.scala-lang copied to clipboard

if/then/else, for, and old syntax

Open erdnaxeli opened this issue 4 years ago • 1 comments

Hi,

This page talks about control structures. For the if/then/else it only expose the (new ?) syntax

if a < b then
  something
else
  something_else

But for the for or the while construct, it also show the old syntax with parenthesis around the condition and curly brackets. Isn't it a bit confusing? Should not the doc either:

  • present the old syntax for the if/then/else too
  • or present only the new syntax for all construct (my preferred solution)?

erdnaxeli avatar Nov 07 '21 12:11 erdnaxeli

present the old syntax for the if/then/else too

agree

SethTisue avatar Nov 07 '21 16:11 SethTisue

I just looked at this bug and that page, and if I understand it right, I think this has been completed as part of #2481, and can be closed?

alvinj avatar Nov 10 '22 14:11 alvinj

I think you're right.

erdnaxeli avatar Nov 10 '22 14:11 erdnaxeli