Click here to Skip to main content
15,122,043 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Properties, Parameters, Fields Pin
michaelbarb17-Aug-21 9:09
Membermichaelbarb17-Aug-21 9:09 
GeneralRe: Properties, Parameters, Fields Pin
PIEBALDconsult17-Aug-21 9:18
professionalPIEBALDconsult17-Aug-21 9:18 
GeneralRe: Properties, Parameters, Fields Pin
michaelbarb17-Aug-21 9:21
Membermichaelbarb17-Aug-21 9:21 
GeneralRe: Properties, Parameters, Fields Pin
Nelek17-Aug-21 10:47
protectorNelek17-Aug-21 10:47 
GeneralRe: Properties, Parameters, Fields Pin
  Forogar  17-Aug-21 9:23
professional  Forogar  17-Aug-21 9:23 
GeneralRe: Properties, Parameters, Fields Pin
Wizard of Sleeves17-Aug-21 20:52
MemberWizard of Sleeves17-Aug-21 20:52 
GeneralRe: Properties, Parameters, Fields Pin
Richard Deeming17-Aug-21 22:44
mveRichard Deeming17-Aug-21 22:44 
GeneralRe: Properties, Parameters, Fields Pin
Member 916705717-Aug-21 22:55
MemberMember 916705717-Aug-21 22:55 
Coming from C#, parameters don't exist (the way you describe them). There's fields & properties with properties having getters/setters and fields being just member variables.

I personally use fields as much as possible (KISS principle), but switch to properties if needed, i.e. when I need a private setter and a public getter or override getters in derived classes.

The difference is more on the syntactic side of things. Semantically, both properties & fields are variables-this-object-exposes and whatever the object does with those variables, that's the object's own business.
GeneralRe: Properties, Parameters, Fields Pin
BillWoodruff17-Aug-21 23:46
mveBillWoodruff17-Aug-21 23:46 
GeneralRe: Properties, Parameters, Fields Pin
michaelbarb18-Aug-21 13:06
Membermichaelbarb18-Aug-21 13:06 
GeneralRe: Properties, Parameters, Fields Pin
HotN18-Aug-21 19:06
MemberHotN18-Aug-21 19:06 
GeneralRe: Properties, Parameters, Fields Pin
michaelbarb19-Aug-21 13:37
Membermichaelbarb19-Aug-21 13:37 
GeneralRIP Nanci Griffith Pin
jeron117-Aug-21 7:36
Memberjeron117-Aug-21 7:36 
GeneralRe: RIP Nanci Griffith Pin
Southmountain17-Aug-21 9:19
MemberSouthmountain17-Aug-21 9:19 
GeneralRe: RIP Nanci Griffith Pin
jeron117-Aug-21 9:28
Memberjeron117-Aug-21 9:28 
GeneralOld device rendered useless due to one bad design decision... Pin
dandy7217-Aug-21 5:29
Memberdandy7217-Aug-21 5:29 
GeneralRe: Old device rendered useless due to one bad design decision... Pin
Jacquers17-Aug-21 5:43
MemberJacquers17-Aug-21 5:43 
GeneralRe: Old device rendered useless due to one bad design decision... Pin
dandy7217-Aug-21 10:58
Memberdandy7217-Aug-21 10:58 
JokeRe: Old device rendered useless due to one bad design decision... Pin
englebart17-Aug-21 16:26
professionalenglebart17-Aug-21 16:26 
GeneralThought of the Day Pin
OriginalGriff17-Aug-21 5:19
mveOriginalGriff17-Aug-21 5:19 
GeneralRe: Thought of the Day Pin
jeron117-Aug-21 5:38
Memberjeron117-Aug-21 5:38 
GeneralRe: Thought of the Day Pin
W Balboos, GHB17-Aug-21 6:22
mveW Balboos, GHB17-Aug-21 6:22 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer17-Aug-21 9:09
professionalDaniel Pfeffer17-Aug-21 9:09 
GeneralRe: Thought of the Day Pin
Johnny J.18-Aug-21 0:28
professionalJohnny J.18-Aug-21 0:28 
GeneralRe: Thought of the Day Pin
OriginalGriff18-Aug-21 1:09
mveOriginalGriff18-Aug-21 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.