You are not logged in.
Pages: 1
I have a question around the naming of the new parameter to function BinarySave(). Why not name the parameters "Crc32Trailer" or "WithCrc32Trailer"?
function BinarySave(Data: pointer; Info: PRttiInfo; Kinds: TRttiKinds;
NoCrc32Trailer: boolean = true): RawByteString; overload; //==> WithCrc32Trailer: boolean = false
Then you don't have to write the following:
if not NoCrc32Trailer then
W.Write4(0);
I always have a bad feeling about an identifier that starts with "No...". You have to think exactly opposite to what you feel.
With best regards
Thomas
Offline
It was because there is already such a parameter, with the same name, so we stayed in synch.
But you are right that NoSomething: boolean may be confusing.
We may indeed need change the boolean everywhere...
Check https://github.com/synopse/mORMot2/commit/be24bbf50
Online
Pages: 1