can someone confirm or correct my understanding of...
# announcements
l
can someone confirm or correct my understanding of programming terminology? identifier: things that programmers can choose a name for object: (not the kotlin keyword specifically but in general) group of identifiers member: direct child of an object class: identifier that blueprints an object singleton: class that can only produce a single object which is accessed as if the class IS the object variable: identifier that stores a value field: member variable property: field with getter and setter attribute: vague term, does not have a unique definition function: identifier for which i dont find the right words to describe it method: member function lambda: nameless function closure: lambda that captures it's context
m
An identifier is the name or label itself, not the thing labeled.
An object is an encapsulated data structure with associated behavior you can invoke via methods.
Members aren't children, they're part of the object itself.
A variable is a storage location which has an identifier associated with it. Technically the identifier doesn't store the value, it labels where the value is stored.
r
Also, there is no such restriction for Singleton:
which is accessed as if the class IS the object
Many languages (such as Java) use some sort of
Class.getInstance()
m
Yes, in Java typically a singleton is an object when you use it, not a class you access like an object.