This effect can be reached if only records support 'default', but it's not support. If I'm write:
TMyItem=record
Data:string;default;
Checked:boolean;
Founded:boolean;
end;
I've got error. Also if I go this way - I need to do all from scratch without using of already complete classes like TStringList and TBoolList.
You can do that, if you
overload assignment operator.
But you don't want to do that, because it breaks TMyItem interface consistency.
There're 3 attributes (Data, Checked, Founded) in the interface so far.
And the consistent way, is when you access each attribute by its name.
b[i].Data:='123123'
b[i].Checked:=true;
b[i].Founded:=true;
What you're asking for is to break the consistency (not every attribute is accessed by its name) and even introduce duplication (where .Data could be access by either explicit name or by unnamed (default) operation)
b[i]:='123123';
b[i].Data:='123123';
The only benefit from that is you need to type 5 characters less.
It doesn't make the code more human-readable. Instead it might look puzzling, since exactly the same operation could be done in two different ways. And the code reader/maintainer has to keep in mind that .Data might be changed in a different way.
The less duplication - the better.