I was just wondering about why should I use property in a class instead of \"normal\" variables (class attributes?). What I mean is this:
TSampleClass = clas
There are real-life advantages:
EDIT: Another thing I thought of, properties force you to limit Get/Set methods to only 1 parameter, which is good for OOP. Compare that to some over-engineered functions:
GetItem(Index:integer; ForcedIndex:boolean=false):TItem //Forced index to get any value
GetItem(Index:integer; out Res:PItem):boolean //Result signals if out pointer is valid