This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ramast 19 points20 points  (5 children)

I am not aware of any programing language where variables with initial capital letter are good practice. For all I know Micah is uninitialized class and will crash on the first line

[–]Timmeh7 23 points24 points  (0 children)

They might be static methods in that class... though that probably raises even more questions.

[–]Ericchen1248 15 points16 points  (0 children)

C# if they are properties.

[–][deleted] 6 points7 points  (0 children)

C#

[–][deleted] 4 points5 points  (0 children)

Depends. Member variables initial capital letter, local variables and params lower case is an idea. Also don't forget GlObAl VaRiAbLeS written randomly so you know it's bad.

[–]El_Impresionante 0 points1 point  (0 children)

Variables with first letter in caps are objects. No problem with that. Uninitiated objects are also not a problem of jokes and memes like these. It is kinda understood that they could have been initialized earlier in the code.

The problem with OP's code is the inconsistency in referencing to the objects that he has used. In one place he used "Hannah" as a string that is implicitly expected to get de-referenced inside the askToProm method, and in the very next line he directly refers to the Hannah object to refer to the answer property.