-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Acyclic Visitor pattern #734 #753
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8bf53fe
Adding acyclic-visitor module in pom.xml
Argyro-Sioziou e9a219f
Merge branch 'master' of https://github.com/Argyro-Sioziou/java-desig…
Argyro-Sioziou 9e15abb
Adding pom.xml file
Argyro-Sioziou 18a75c0
Adding ModemVisitor interface
Argyro-Sioziou 3f92b8f
Adding ModemTest
Argyro-Sioziou 75734a6
Adding Modem abstract class
giorgosmav21 323395d
Adding ModemVisitorTest
giorgosmav21 bbdf1cd
Adding Hayes and Zoom classes
giorgosmav21 9771884
Adding HayesVisitor and ZoomVisitor
Argyro-Sioziou 5e1da63
Adding ConfigureForDosVisitor and ConfigureForUnixVisitor
Argyro-Sioziou 36a1477
Adding App class
giorgosmav21 27f58e0
Adding HayesTest and ZoomTest
giorgosmav21 17164c2
Adding class diagram
Argyro-Sioziou 4023944
Adding README.md file
giorgosmav21 afe85e2
Enhancing code format
Argyro-Sioziou 179a02b
Removing default constructors
Argyro-Sioziou 49feead
Removing interfaces' test classes
Argyro-Sioziou 6167d06
Removing test case
Argyro-Sioziou 8b1ed95
Updating ConfigureForDosVisitorTest and ConfigureForUnixVisitorTest c…
Argyro-Sioziou 6a0fa74
Fixing typos
Argyro-Sioziou 6636fb1
Adding AllModemVisitor interface
Argyro-Sioziou 04d80f0
Adding consequences in README.md
Argyro-Sioziou 51659fe
Updating HayesVisitor and ZoomVisitor
Argyro-Sioziou 57f60c5
Updating javadoc comments
Argyro-Sioziou f9bdd58
Merge remote-tracking branch 'upstream/master'
Argyro-Sioziou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
layout: pattern | ||
title: Acyclic Visitor | ||
folder: acyclic-visitor | ||
permalink: /patterns/acyclic-visitor/ | ||
categories: Behavioral | ||
tags: | ||
- Java | ||
- Difficulty-Intermediate | ||
--- | ||
|
||
 | ||
|
||
## Intent | ||
Allow new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the troublesome dependency cycles that are inherent to the GOF VISITOR Pattern. | ||
|
||
## Applicability | ||
This pattern can be used: | ||
* When you need to add a new function to an existing hierarchy without the need to alter or affect that hierarchy. | ||
* When there are functions that operate upon a hierarchy, but which do not belong in the hierarchy itself. e.g. the ConfigureForDOS / ConfigureForUnix / ConfigureForX issue. | ||
* When you need to perform very different operations on an object depending upon its type. | ||
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class. | ||
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive. | ||
|
||
## Consequences | ||
The good: | ||
* No dependency cycles between class hierarchies. | ||
* No need to recompile all the visitors if a new one is added. | ||
* Does not cause compilation failure in existing visitors if class hierarchy has a new member. | ||
|
||
The bad: | ||
* Violates the principle of least surprise or Liskov's Substitution principle by showing that it can accept all visitors but actually only being interested in particular visitors. | ||
* Parallel hierarchy of visitors has to be created for all members in visitable class hierarchy. | ||
|
||
## Related patterns | ||
* [Visitor Pattern](../visitor/README.md) | ||
|
||
## Credits | ||
* [Acyclic Visitor](http://condor.depaul.edu/dmumaugh/OOT/Design-Principles/acv.pdf) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<class-diagram version="1.2.2" icons="true" always-add-relationships="false" generalizations="true" realizations="true" | ||
associations="true" dependencies="false" nesting-relationships="true" router="FAN"> | ||
<interface id="1" language="java" name="com.iluwatar.acyclicvisitor.ModemVisitor" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ModemVisitor.java" binary="false" | ||
corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="860" y="67"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</interface> | ||
<class id="2" language="java" name="com.iluwatar.acyclicvisitor.Modem" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/Modem.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="327" y="77"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</class> | ||
<class id="3" language="java" name="com.iluwatar.acyclicvisitor.ConfigureForUnixVisitor" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitor.java" binary="false" | ||
corner="BOTTOM_RIGHT"> | ||
<position height="124" width="196" x="647" y="225"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</class> | ||
<class id="4" language="java" name="com.iluwatar.acyclicvisitor.Zoom" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/Zoom.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="203" y="305"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</class> | ||
<interface id="5" language="java" name="com.iluwatar.acyclicvisitor.HayesVisitor" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/HayesVisitor.java" binary="false" | ||
corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="1019" y="468"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</interface> | ||
<interface id="6" language="java" name="com.iluwatar.acyclicvisitor.ZoomVisitor" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ZoomVisitor.java" binary="false" | ||
corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="758" y="467"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</interface> | ||
<class id="7" language="java" name="com.iluwatar.acyclicvisitor.Hayes" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/Hayes.java" binary="false" corner="BOTTOM_RIGHT"> | ||
<position height="-1" width="-1" x="479" y="307"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</class> | ||
<class id="8" language="java" name="com.iluwatar.acyclicvisitor.ConfigureForDosVisitor" project="acyclic-visitor" | ||
file="/acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitor.java" binary="false" | ||
corner="BOTTOM_RIGHT"> | ||
<position height="142" width="192" x="883" y="225"/> | ||
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</display> | ||
</class> | ||
<generalization id="9"> | ||
<end type="SOURCE" refId="7"/> | ||
<end type="TARGET" refId="2"/> | ||
</generalization> | ||
<realization id="10"> | ||
<end type="SOURCE" refId="8"/> | ||
<end type="TARGET" refId="6"/> | ||
</realization> | ||
<realization id="11"> | ||
<end type="SOURCE" refId="8"/> | ||
<end type="TARGET" refId="5"/> | ||
</realization> | ||
<realization id="12"> | ||
<end type="SOURCE" refId="3"/> | ||
<end type="TARGET" refId="6"/> | ||
</realization> | ||
<realization id="13"> | ||
<end type="SOURCE" refId="3"/> | ||
<end type="TARGET" refId="1"/> | ||
</realization> | ||
<realization id="14"> | ||
<end type="SOURCE" refId="8"/> | ||
<end type="TARGET" refId="1"/> | ||
</realization> | ||
<generalization id="15"> | ||
<end type="SOURCE" refId="4"/> | ||
<end type="TARGET" refId="2"/> | ||
</generalization> | ||
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" | ||
sort-features="false" accessors="true" visibility="true"> | ||
<attributes public="true" package="true" protected="true" private="true" static="true"/> | ||
<operations public="true" package="true" protected="true" private="true" static="true"/> | ||
</classifier-display> | ||
<association-display labels="true" multiplicity="true"/> | ||
</class-diagram> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!-- | ||
|
||
The MIT License | ||
Copyright (c) 2014 Ilkka Seppälä | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.iluwatar</groupId> | ||
<artifactId>java-design-patterns</artifactId> | ||
<version>1.20.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>acyclic-visitor</artifactId> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core --> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<version>3.9.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/uk.org.lidalia/slf4j-test --> | ||
<dependency> | ||
<groupId>uk.org.lidalia</groupId> | ||
<artifactId>slf4j-test</artifactId> | ||
<version>1.0.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>1.9.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
30 changes: 30 additions & 0 deletions
30
acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/AllModemVisitor.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* The MIT License | ||
* Copyright (c) 2014-2016 Ilkka Seppälä | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
package com.iluwatar.acyclicvisitor; | ||
|
||
/** | ||
* All ModemVisitor interface extends all visitor interfaces | ||
*/ | ||
public interface AllModemVisitor extends ModemVisitor, ZoomVisitor, HayesVisitor{ | ||
|
||
} |
55 changes: 55 additions & 0 deletions
55
acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/App.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* The MIT License | ||
* Copyright (c) 2014-2016 Ilkka Seppälä | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
package com.iluwatar.acyclicvisitor; | ||
|
||
/** | ||
* The Acyclic Visitor pattern allows new functions to be added to existing class | ||
* hierarchies without affecting those hierarchies, and without creating the dependency | ||
* cycles that are inherent to the GoF Visitor pattern, by making the Visitor base class | ||
* degenerate | ||
* <p> | ||
* In this example the visitor base class is {@link ModemVisitor}. The base class of the | ||
* visited hierarchy is {@link Modem} and has two children {@link Hayes} and {@link Zoom} | ||
* each one having its own visitor interface {@link HayesVisitor} and {@link ZoomVisitor} | ||
* respectively. {@link ConfigureForUnixVisitor} and {@link ConfigureForDosVisitor} | ||
* implement each derivative's visit method only if it is required | ||
*/ | ||
public class App { | ||
|
||
/** | ||
* Program's entry point | ||
*/ | ||
|
||
public static void main(String[] args) { | ||
ConfigureForUnixVisitor conUnix = new ConfigureForUnixVisitor(); | ||
ConfigureForDosVisitor conDos = new ConfigureForDosVisitor(); | ||
|
||
Zoom zoom = new Zoom(); | ||
Hayes hayes = new Hayes(); | ||
|
||
hayes.accept(conDos); // Hayes modem with Unix configurator | ||
zoom.accept(conDos); // Zoom modem with Dos configurator | ||
hayes.accept(conUnix); // Hayes modem with Unix configurator | ||
zoom.accept(conUnix); // Zoom modem with Unix configurator | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitor.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* The MIT License | ||
* Copyright (c) 2014-2016 Ilkka Seppälä | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
package com.iluwatar.acyclicvisitor; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* ConfigureForDosVisitor class implements both zoom's and hayes' visit method | ||
* for Dos manufacturer | ||
*/ | ||
public class ConfigureForDosVisitor implements AllModemVisitor { | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class); | ||
|
||
public void visit(Hayes hayes) { | ||
LOGGER.info(hayes + " used with Dos configurator."); | ||
} | ||
|
||
public void visit(Zoom zoom) { | ||
LOGGER.info(zoom + " used with Dos configurator."); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: How about a consequences section explaining the good and bad points.
The good
The bad