-
Notifications
You must be signed in to change notification settings - Fork 1k
add explanation in book that indentation is significant #2266
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
Hi @SethTisue. Unfortunately I have to focus on paid work at the moment, but yes, if we didn’t mention that, it should be added. I’ll be glad to do this as part of some volunteer work again next year, but honestly, it won’t be until somewhere around March-June. |
maybe someone else would like to pick this up. |
Hi @SethTisue, I am new here but would love to contribute to scala docs. can I be assigned to this issue? |
sure, go for it! |
should i move the explanation here:https://docs.scala-lang.org/style/indentation.html to scala book? |
this explanation is for Scala 2, where indentation is only a style preference. You could adapt from the official reference for Scala 3's indentation (but it is not very beginner friendly) |
This is actually a pretty fundamental thing that I missed in the book. I agree with the initial comment that it could go in the Control Structures section, since that’s where it’s first shown, or just prior to that section. FWIW, I also see on that Control Structures page that I left the Scala 2 example indented with four spaces, which is not consistent with the rest of the page. |
There is no explanation in the book that indentation is significant and needed for the compiler. When searching for 'Indentation' it is only referenced in the Style Guide, Migration Guide and Language Reference.
I think for new learners that start learning Scala with Scala3 and the Scala3 book, it would be very helpful to add a few lines of explanation e.g. in A Taste of Scala - Control Structures or even a chapter of its own, that indentation is significant and must be adhered to.
The text was updated successfully, but these errors were encountered: