Skip to content

Move rogue functions to methods and cleanup

Michael Aaron Murphy requested to merge stratact:master into master

Created by: stratact

The problem with the way main.rs was written, was that it ignored a fundamental rule to encapsulation completely and when you do that, you end doing more work for the object rather than having the object do the work for you. Having the object do the work, allows the programmer to be code correct without having to think about it and not needing to mess with the object's data. So, I moved all of the rogue functions into Shell methods which is where they seem to belong, made all Shell fields private, cleaned up the signatures, and let the Shell object speak for itself.

As a result the code ends up looking cleaner this way and makes it easier for the programmer, API-wise.

Merge request reports