Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terminology of Class "attribute" vs "member" vs "variable" vs "field" [closed]

It seems that developers often use these terms interchangeably when referring to a piece of data stored in an instance of a Class.

Is there any technical difference between each term, or is it fine to use them interchangeably?

like image 408
Josh Diehl Avatar asked Jul 05 '12 18:07

Josh Diehl


People also ask

What is the difference between a class variable and an attribute?

According to this web-page, class attributes are variables owned by the class itself. The web page says tagDataMap is a class attribute. But according to Tutorialspoint.com, "class variable is a variable that is shared by all instances of a class.

What is the difference between a field and an attribute?

Field is common for all records whereas attributes are for some particular records and are the main characteristics of a product.

Is attribute and variable the same?

While an attribute is often intuitive, the variable is the operationalized way in which the attribute is represented for further data processing. In data processing data are often represented by a combination of items (objects organized in rows), and multiple variables (organized in columns).


1 Answers

"member" is broader term. It refers everything in that class (instance methods/variables etc.,)

"attribute/variable/field" are same and "member" can be used too.

like image 190
kosa Avatar answered Oct 15 '22 20:10

kosa