warofants / wwa

World War of Ants
https://worldwarofants.com
GNU General Public License v3.0
146 stars 80 forks source link

Remove I prefix from Interface names #145

Closed nylanderdev closed 3 years ago

alexdqmf commented 4 years ago

Codecov Report

Merging #145 into development will not change coverage by %. The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             development     #145   +/-   ##
==============================================
  Coverage          13.38%   13.38%           
  Complexity             8        8           
==============================================
  Files                 19       19           
  Lines                157      157           
  Branches               3        3           
==============================================
  Hits                  21       21           
  Misses               136      136           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c9e208d...3cde54a. Read the comment docs.

Veradux commented 4 years ago

What is the purpose of this? What do we gain from removing the prefixes?

nylanderdev commented 4 years ago

It's important to establish proper conventions early on in development. The "I" prefix is somewhat frowned upon, and for good reason (see quote).

"I prefer to leave interfaces unadorned. The preceding I, so common in today’s legacy wads, is a distraction at best and too much information at worst. I don’t want my users knowing that I’m handing them an interface." - Robert "Uncle Bob" Martin, Clean Code

Veradux commented 4 years ago

It's important to establish proper conventions early on in development. The "I" prefix is somewhat frowned upon, and for good reason (see quote).

"I prefer to leave interfaces unadorned. The preceding I, so common in today’s legacy wads, is a distraction at best and too much information at worst. I don’t want my users knowing that I’m handing them an interface." - Robert "Uncle Bob" Martin, Clean Code

The reason why I added the prefix was because a lot of new people had interest in the project, and I wanted to make it more obvious what each type was.

Thanks for the quote. But this doesn't sound like a full explanation. Why would you want to hide the fact that you're handing the users an interface? How can this information become too much, why is it harmful? I'm very interested in learning more about this.