Skip to content
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

Taste section on match control structure is difficult to follow #3124

Open
stev-0 opened this issue Dec 3, 2024 · 1 comment
Open

Taste section on match control structure is difficult to follow #3124

stev-0 opened this issue Dec 3, 2024 · 1 comment

Comments

@stev-0
Copy link

stev-0 commented Dec 3, 2024

As a newcomer to the Scala language, I find this section difficult to follow.

It would help if Person and namewere defined somewhere to be able to compile at least but it's not at all clear what is going on to me.

Is anyone able to shed some light, happy to improve the docs myself once I understand what's trying to be demonstrated here.

@stev-0
Copy link
Author

stev-0 commented Dec 4, 2024

I cribbed the example from Control Structures and made some modifications to illustrate it better here. I guess the point is that if you need to have a complex match condition decomposing an object, you can do, but appreciate this is a bit contrived.

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

1 participant