Naming questions

So I am still trying to wrap my head around some of the concepts but I was curious to the reasoning behind changing the naming of the variable of Input to Guess than to Word. **

Ex ample… bool UBullCowCartridge::IsIsogram(FString Word) const

** Is it not technically the same thing and since it wont change until they are prompted to guess again?

Hi
You can name your variables whatever you like, as it won’t affect anything except for your perception of what this variable is responsible for. Remember that everyone has different mind, so there could be tons of other namings for this variable which would suit better in mind of other people.
The only piece of advice here is to name your variables properly, so it would be easier to understand why this variable is here for.

PS: if you want to know the reasoning for this particular case, then you should ask that course’s teacher directly.

The reasoning here is that the function works for any word not just the guess. It is actually used later for words from a word list i.e. not the guess.

So “Word” more accurately describes the name. Whereas “ProcessGuess” is only for the user’s guess.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms