Simplifying code in lesson 2 #6
-
In lesson two, near the end (link to video), its mentioned you can simplify the code by removing the
can just be
Though I would assume the Solidity compiler would optimize this for us. So is this a purely coding style thing or is there additional reasons to simplify this code? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Refactoring code is all about eliminating redundancy and increasing readability. So yes, you could say this is purely a style thing, but think of it more like an upgrade in the quality of the code because it's so much easier to read and understand. |
Beta Was this translation helpful? Give feedback.
Refactoring code is all about eliminating redundancy and increasing readability. So yes, you could say this is purely a style thing, but think of it more like an upgrade in the quality of the code because it's so much easier to read and understand.