SysUtils.pas

SysUtils.pas

Why parameters of these anonymous not const?

TProc = reference to procedure (Arg1: T1; Arg2: T2);
TProc = reference to procedure (Arg1: T1; Arg2: T2; Arg3: T3);
TFunc = reference to function (Arg1: T): TResult;
TFunc = reference to function (Arg1: T1; Arg2: T2): TResult;

Comments

  1. David Heffernan Yup. Since it's unlikely the compiler will every be updated to make const an automatic thing, perhaps they could add const versions to the RTL.

    ReplyDelete
  2. Yeah, we end up making our own versions of these to add the consts in all our projects.

    ReplyDelete
  3. Do file a QP, please. Major releases like the upcoming 10.3 are the time to make interface-breaking changes.

    ReplyDelete

Post a Comment