DEVELOPERS: Terminology poll! I am interested in your understanding of the word “property,” regardless of programming language.
-
@helge
Ah, no side effects •other than the property state itself• — yes, agreed! -
@inthehands Essentially this:
```
thing.a = 5
thing.a = 5
thing.a = 5
```
should modify nothing but `a`. But those could also be composed values, the key thing is that you can assign as often as you want w/o side effects.
That's what makes a property to me, not whether it is computed or stored. -
@yoshimcf
It varies quite a lot by lang!Swift has a definition that’s as close to C#’s as not. (It has no surface-visible ivars at all; you can only define getters and setters, and “stored properties” have implied but invisible ivars.)
Javascript freely muddles the get/set and ivar meanings.
Thus the poll: I want to see whether it’s a widely understood term. It seems not to be, not without lots of hand-waving anyway.
-
@helge
Yeah, then in that case, I think our personal definitions are very close. -
DEVELOPERS: We need technical jargon because it is precise and it allows us to communicate!
ALSO DEVELOPERS: We do not agree on the meanings of even the most common words…ever, basically
-
@inthehands “Words are useless, especially sentences. They don't stand for anything. How could they explain how I feel?" - Madonna but obvs written by Björk
-
Hmm...please give an example of a developer jargon term that is very, very ambiguous.
-
Oliphantom Menacereplied to Paul Cantrell last edited by
@inthehands I usually think of getters and setters as "accessors" but it turns out those are essentially a kind of property.
-
@ashwin
Well, see the poll results.Or if that’s not satisfying, oh…”port”
-
FOLLOW-UP: Suppose I alter the code. Now it looks like this:
private colorHexCode: String
public getColor() { return self.colorHexCode }
public setColor(color: String) { self.colorHexCode = color }Does this object have a “color” property?
-
FOLLOW-UP #2: In the context of your day-to-day programming, does “attribute” mean the same thing as “property” to you?
-
@inthehands need an "i dunno i'd probably try to work out whether my audience cared" option
-
Rachael Ludwickreplied to Paul Cantrell last edited by
@inthehands probably would depend on language and the common conventions of that language community which, uh, maybe not great.
-
@trochee
This is for students, of course; trying to give them a sense of which terms are well-defined, because if I give them a sense of false precision, it’s going to confuse the crap out of them later. -
Paul Cantrellreplied to Rachael Ludwick last edited by
@r343l
This really seems to be the actual answer to all these questions. -
@ashwin @inthehands I have worked at a place — a household name even — where “grandfather the data” meant to “reprocess all the old data”, which is the *exact opposite* of what “grandfathering” something means
-
There's no law against misuse of words.
Some fools not understanding a word doesn't mean that the word itself has no clearly defined meaning.
-
@ashwin @jonathankoren
And that seems to end the issue, until that terrible day when you spend 20 minutes talking to a linguist and realizing that the fools using words is they very thing that •gives• them meaning. -
Kiran Castellino :he_him:replied to Oliphantom Menace last edited by
@oliphant @inthehands Accessors in JavaScript are very new, and they're just sugar for a getter/setter pair attached to an internal slot. They're only needed for the decorators proposal
-
Oliphantom Menacereplied to Kiran Castellino :he_him: last edited by
@kiranc @inthehands To be honest, my knowledge of them as accessors really precedes that, in Java and CFML.
And this reference refers to them as 'accessor methods' rather than 'properties', which is more of my understanding of what an accessor is.
Accessor and Mutator in Java - Javatpoint
Accessor and Mutator in Java with java tutorial, features, history, variables, programs, operators, oops concept, array, string, map, math, methods, examples etc.
www.javatpoint.com (www.javatpoint.com)