What's the difference between Property and Attribute
-
a property is, well a property - the land under your house. Can't move it, it's fixed. an attribute is the house, can replace it, can completely remove it, grass is an attribute, a hole in the proptery is an attribute - all those can be changed. sooo, everything about your car is an attribute. The fact it is a car is a property. ok, can get silly and ask "what if I remove all the wheels, is it still a car?" well, it weelie is still a car, just missing some of it's attributes (so not a very useful car).
Message Signature (Click to edit ->)
When you list up the someone's inner properties, it's a tribute. * Do not bother, I'm already gone *
-
No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?
Wrong is evil and must be defeated. - Jeff Ello
Jörgen Andersson wrote:
Or is there an even better word?
A feature.
-
No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?
Wrong is evil and must be defeated. - Jeff Ello
Within .Net, my understanding is that a property will have a getter and/or a setter with possibly some logic in them. And an attribute would just be a public variable, for example, where there is no logic in the get and set. But that is just from my experience, nothing official. Could be totally wrong.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
There is none. Field, property, attribute are mostly interchangeable AFAIK.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
den2k88 wrote:
property, attribute are mostly interchangeable AFAIK
disagree, it's contextually dependent. Example: a yellow banana property: banana - it can not be anything else (excluding if destroyed) attribute: color: yellow - the color of the banana can change - left alone will become brown, black, slime, destroyed but the color itself (not color of the banana) is a property. yellow is yellow, it can be no other.
Message Signature (Click to edit ->)
-
Lopatir wrote:
Can't move it, it's fixed.
In .Net, properties can have get and set methods which means they are not treated that way, in .Net at least.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
Within .Net, my understanding is that a property will have a getter and/or a setter with possibly some logic in them. And an attribute would just be a public variable, for example, where there is no logic in the get and set. But that is just from my experience, nothing official. Could be totally wrong.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
I know the difference in .Net, it's the lingual difference or semantics I'm after.
Wrong is evil and must be defeated. - Jeff Ello
-
Within .Net, my understanding is that a property will have a getter and/or a setter with possibly some logic in them. And an attribute would just be a public variable, for example, where there is no logic in the get and set. But that is just from my experience, nothing official. Could be totally wrong.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
Jörgen Andersson wrote:
Or is there an even better word?
A feature.
So a bug? :~
Wrong is evil and must be defeated. - Jeff Ello
-
OP:
Quote:
No, I don't mean in .Net, I mean semantically.
Message Signature (Click to edit ->)
Yes, I read that. But the meaning in .Net might actually be the real meaning. Just saying.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
a property is, well a property - the land under your house. Can't move it, it's fixed. an attribute is the house, can replace it, can completely remove it, grass is an attribute, a hole in the proptery is an attribute - all those can be changed. sooo, everything about your car is an attribute. The fact it is a car is a property. ok, can get silly and ask "what if I remove all the wheels, is it still a car?" well, it weelie is still a car, just missing some of it's attributes (so not a very useful car).
Message Signature (Click to edit ->)
Lopatir wrote:
sooo, everything about your car is an attribute. The fact it is a car is a property.
So the colour of the car is an attribute. The wheel is a property in it self, but an attribute to the car?
Wrong is evil and must be defeated. - Jeff Ello
-
No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?
Wrong is evil and must be defeated. - Jeff Ello
-
No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?
Wrong is evil and must be defeated. - Jeff Ello
I'd say that the two words were essentially synonymous outside of IT.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
-
So a bug? :~
Wrong is evil and must be defeated. - Jeff Ello
-
No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?
Wrong is evil and must be defeated. - Jeff Ello
In the English language "property" and "attribute" are exactly the same meaning in the case where "property" is a property of an object such as "a banana is yellow". In this case, "yellow" is an attribute or property of the banana. If you are buying a house then the house can be referred to as a "property" but this is a different meaning and has nothing to do with "attribute". You can also "attribute" a quotation to a given person but this is a different meaning and has nothing to do with "property". Additionally, you can say, "That is my property" when referring to an object that belongs to you. Again, nothing to do with "attribute".
- I would love to change the world, but they won’t give me the source code.
-
In the English language "property" and "attribute" are exactly the same meaning in the case where "property" is a property of an object such as "a banana is yellow". In this case, "yellow" is an attribute or property of the banana. If you are buying a house then the house can be referred to as a "property" but this is a different meaning and has nothing to do with "attribute". You can also "attribute" a quotation to a given person but this is a different meaning and has nothing to do with "property". Additionally, you can say, "That is my property" when referring to an object that belongs to you. Again, nothing to do with "attribute".
- I would love to change the world, but they won’t give me the source code.
I was hoping one was more related to nouns and the other one to adjectives or adverbs
Wrong is evil and must be defeated. - Jeff Ello
-
Quote:
So a bug?
No, no. A Bug is an "undocumented feature"; a "feature" is just something that might or might not work.
- I would love to change the world, but they won’t give me the source code.
If the undocumented feature is working, is it still a bug?
Wrong is evil and must be defeated. - Jeff Ello
-
a property is, well a property - the land under your house. Can't move it, it's fixed. an attribute is the house, can replace it, can completely remove it, grass is an attribute, a hole in the proptery is an attribute - all those can be changed. sooo, everything about your car is an attribute. The fact it is a car is a property. ok, can get silly and ask "what if I remove all the wheels, is it still a car?" well, it weelie is still a car, just missing some of it's attributes (so not a very useful car).
Message Signature (Click to edit ->)
What if I added some more properties and turned it into a boat and a helicopter all at once? Also it's important that it runs on raspberry juice (or whale oil) and has a robot as the pilot[^].
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
den2k88 wrote:
property, attribute are mostly interchangeable AFAIK
disagree, it's contextually dependent. Example: a yellow banana property: banana - it can not be anything else (excluding if destroyed) attribute: color: yellow - the color of the banana can change - left alone will become brown, black, slime, destroyed but the color itself (not color of the banana) is a property. yellow is yellow, it can be no other.
Message Signature (Click to edit ->)
-
When you list up the someone's inner properties, it's a tribute. * Do not bother, I'm already gone *
I rather liked this one. bookmarked.
-
I was hoping one was more related to nouns and the other one to adjectives or adverbs
Wrong is evil and must be defeated. - Jeff Ello
Isn't the English language fun! :-D
"When you are dead, you won't even know that you are dead. It's a pain only felt by others; same thing when you are stupid." Ignorant - An individual without knowledge, but is willing to learn. Stupid - An individual without knowledge and is incapable of learning. Idiot - An individual without knowledge and allows social media to do the thinking for them.