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

Made structural pattern matching practicable... #1167

Merged
merged 20 commits into from
Mar 4, 2016
Merged

Made structural pattern matching practicable... #1167

merged 20 commits into from
Mar 4, 2016

Conversation

danieldietrich
Copy link
Member

...by reducing the amount of generated methods (per unapply method) from 11^n to 1, where n is the number of unapplied fields of an object.

Now, object trees of arbitrary(!) depth can be matched but the decomposition takes place in the first level of the object tree (the given object is level 0).

Before we could select arbitrary nodes of the object tree. That is not possible any more because it requires the patterns to return the actual arity using tuples - and therefore all possible return combinations had to be generated. This is simply not possible resp. practicable in a real-world application and soon exceeds the class file size. However, this is solved with this PR!!!

@codecov-io
Copy link

Current coverage is 95.82%

Merging #1167 into master will decrease coverage by -0.17% as of 52b01b9

@@            master   #1167   diff @@
======================================
  Files           78      77     -1
  Stmts         9063    9125    +62
  Branches      1712    1716     +4
  Methods          0       0       
======================================
+ Hit           8700    8744    +44
- Partial         90      93     +3
- Missed         273     288    +15

Review entire Coverage Diff as of 52b01b9

Powered by Codecov. Updated on successful CI builds.

danieldietrich added a commit that referenced this pull request Mar 4, 2016
Made structural pattern matching practicable...
@danieldietrich danieldietrich merged commit bd5440e into vavr-io:master Mar 4, 2016
@danieldietrich
Copy link
Member Author

Towards #1087

@danieldietrich danieldietrich added this to the 2.0.0 milestone Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants