Simple question, but one that I\'ve been curious about...is there a functional difference between the following two commands?
String::class
String.class
The .
operator basically says "send this message to the object". In your example it is calling that particular member. The ::
operator "drills down" to the scope defined to the left of the operator, and then calls the member defined on the right side of operator.
When you use ::
you have to be referencing members that are defined. When using .
you are simply sending a message to the object. Because that message could be anything, auto-completion does not work for .
while it does for ::
.