[fpc-pascal] Syntax changes suggestions

Ryan Joseph ryan at thealchemistguild.com
Tue Jul 17 04:48:41 CEST 2018



> On Jul 16, 2018, at 7:02 AM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> Might come, though not in that way (take your example: what if you pass the instance to some other code that stores it beyond the life time of the function) 

That’s what you guys said about my awesome “stack alias” idea. :) Seriously though I don’t for the life of me understand why programmers can’t be trusted to not do this. You can pass dangling pointers since forever but no one is asking pointers to be removed because they’re too dangerous.

Auto is a good idea. Allocating the “auto” classes the memory backend on the stack (my “stack alias” idea) is even better because you don’t need the memory manager too be involved.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list