Skip to content

Wrong order of sections in chapter "case class" of scala book #1677

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

Closed
marcelo-rosa opened this issue Apr 3, 2020 · 6 comments
Closed

Wrong order of sections in chapter "case class" of scala book #1677

marcelo-rosa opened this issue Apr 3, 2020 · 6 comments

Comments

@marcelo-rosa
Copy link

I think Section No mutator methods should be moved after Section An apply method means you don’t need new, since the example of the first section requires the user have seen the example of the second section.

Or, you cannot execute

scala> christina.name
res0: String = Christina

// can't mutate the `name` field
scala> christina.name = "Fred"
<console>:10: error: reassignment to val
       christina.name = "Fred"

without having executed

scala> case class Person(name: String, relation: String)
defined class Person

// "new" not needed before Person
scala> val christina = Person("Christina", "niece")
christina: Person = Person(Christina,niece)
@SethTisue
Copy link
Member

@alvinj wdyt?

@alvinj
Copy link
Contributor

alvinj commented Apr 6, 2020

Let me take a look at this. We changed parts of the book when I added it here, and I may have moved something so that it’s out of order.

@alvinj
Copy link
Contributor

alvinj commented Apr 9, 2020

Wow, yeah, something is wrong with that page. If I can’t fix it today, I’ll get it fixed this weekend.

@alvinj
Copy link
Contributor

alvinj commented Apr 12, 2020

I forgot to reference this issue when I submitted my pull request a few days ago, but that pull request is #1679. I see that it says “All checks have failed”, but I hope that’s a minor thing.

@SethTisue
Copy link
Member

I see that it says “All checks have failed”, but I hope that’s a minor thing.

Hmm, weird. I'll comment about that on the PR itself.

SethTisue pushed a commit that referenced this issue Apr 16, 2020
…order, so I reversed them. I also simplified some other text. (#1682)
@SethTisue
Copy link
Member

fixed by #1682. thanks @marcelo-rosa for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants