Indeed, yes, but it would cause ripple effects in the Delphi code, if ObjectIdentifier variables are passed to Format calls or Exception constructors. In Delphi, records with operator overloads can't be passed as elements of variant array arguments. Not even if they implement a suitable Implicit operator. Changing the declaration from 'type AnsiString' to a record, would also entail a complete rewrite of any constant declaration in the following form:
const
cAttrValueIdentifiers: array [0..1] of ObjectIdentifier = (
'2.5.4.41', // id-at-name
'2.5.4.4' // id-at-surname
);
to:
const
cAttrValueIdentifiers: array [0..1] of ObjectIdentifier = (
(fData: '2.5.4.41'), // id-at-name
(fData: '2.5.4.4') // id-at-surname
);
If there are several hundreds such constants, and it is critical that each is correct, it is not something you could entrust a Delphi IDE recordable macro. Granted, you could change the type of the constants to array [] of AnsiString, but that would entail a lack of clarity.