[fpc-devel] When will the next version of FPC be released?

Ryan Joseph ryan at thealchemistguild.com
Fri May 31 16:55:38 CEST 2019



> On May 30, 2019, at 4:18 PM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
> 
> I didn’t realize generic functions were in the trunk. I’m not sure I got this implemented properly so it requires some code review but can we try to include “implicitfunctionspecialization” mode switch in the next release along the with actual feature? https://bugs.freepascal.org/view.php?id=35261
> 

{ got blocked again, attempting to resend }

I didn’t realize generic functions were in the trunk. I’m not sure I got this implemented properly so it requires some code review but can we try to include “implicitfunctionspecialization” mode switch in the next release along the with actual feature? https://bugs.freepascal.org/view.php?id=35261

Specifically, for some time now I wanted to make a “ClearMem" function that doesn’t require passing the type but the insanely verbose syntax of generic functions makes it even longer. Honestly the syntax is so intrusive in ObjFPC mode that I would avoid using it all together. 

What we have now:

var
 pt: TPoint;
begin
	FillChar(pt, sizeof(TPoint), 0);

Specialization with generics:

	specialize ClearMem<TPoint>(pt);

With implicit specialization:

ClearMem(pt); // :)

Regards,
	Ryan Joseph




More information about the fpc-devel mailing list