2 Copy edited.
source | link

This is even an antipatterantipattern with its own name: Train Wreck. Several reasons to avoid the replacement have already been stated:

  • Harder to read
  • Harder to debug (both to watch variables and detect exceptions locations)
  • Violation of Demeter Law of Demeter (LoD)

Consider if this method knows too much from other objects. Method chainningchaining is an alternative that could help you to reduce coupling.

Also remmemberremember that references to objects are really cheap.

This is even an antipatter with its own name: Train Wreck. Several reasons to avoid the replacement have already been stated:

  • Harder to read
  • Harder to debug (both to watch variables and detect exceptions locations)
  • Violation of Demeter Law

Consider if this method knows too much from other objects. Method chainning is an alternative that could help you to reduce coupling.

Also remmember that references to objects are really cheap.

This is even an antipattern with its own name: Train Wreck. Several reasons to avoid the replacement have already been stated:

  • Harder to read
  • Harder to debug (both to watch variables and detect exceptions locations)
  • Violation of Law of Demeter (LoD)

Consider if this method knows too much from other objects. Method chaining is an alternative that could help you to reduce coupling.

Also remember that references to objects are really cheap.

1
source | link

This is even an antipatter with its own name: Train Wreck. Several reasons to avoid the replacement have already been stated:

  • Harder to read
  • Harder to debug (both to watch variables and detect exceptions locations)
  • Violation of Demeter Law

Consider if this method knows too much from other objects. Method chainning is an alternative that could help you to reduce coupling.

Also remmember that references to objects are really cheap.