[fpc-pascal] += property bug?

Ryan Joseph genericptr at gmail.com
Wed Aug 14 21:21:34 CEST 2019



> On Aug 14, 2019, at 3:15 PM, James Richters <james at productionautomation.net> wrote:
> 
> I find 
>  viewTransform := TMat4.Identity;
>  viewTransform := viewTransform  * TMat4.Translate(x, y, 1);
>  viewTransform := viewTransform  * TMat4.Scale(scale, scale, 1);
> 
> much more readable.  

then by having both we all win. I never said we shouldn’t both, I’m just reacting to the idea that FPC almost didn’t include them because they "aren’t desirable".

> 
> But I would just do:
>  viewTransform := TMat4.Identity  * TMat4.Translate(x, y, 1) * TMat4.Scale(scale, scale, 1);
> 
> why bother storing the intermediate results at all?

Maybe that was a bad example but I still like to break up lines. For anyone that knows, does the compiler have any fancy optimizations to not store the intermediate results?

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list