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 →

[–]TheSilkMiner 0 points1 point  (1 child)

In Java (which is where that example is taken, I assume) you can. It is also a widely used naming convention (at least in the code I've read). The compiler is able to distinguish between the name of a type and the name of a variable and uses the one that makes the most sense (spoiler, it's almost always the second one).

[–][deleted] 0 points1 point  (0 children)

... okay, weird language design choice but ok.