I'm just wondering about this David Heffernan​​​'s suggestion on this SO question.

I'm just wondering about this David Heffernan​​​'s suggestion on this SO question.

"On the other hand, I cannot understand why TContrat is a class. It should be a record. Replace the object list with an array and replace the class with a record and you should be in a much better place."

This is the definition of TContrat:


TContrat = class
private
FdDateDeb: TDate;
public
property dDateDeb: TDate read FdDateDeb write FdDateDeb;
end;

Why should we use record here David? Maybe because the class doesn't implement any behavior at all? 
http://stackoverflow.com/questions/37659536/delphi-create-json

Comments