On Wed, 12 Apr 2017, Ryan Joseph wrote:


On Apr 12, 2017, at 9:25 PM, Michael Van Canneyt <mich...@freepascal.org> wrote:

Adding a pop/push requires compiler magic, and could be implemented; but the 
question is whether it is worth it, given the plethora of other
options at your disposal.

Why magic?  It seems silly the operator += doesn’t exist or even a basic
operation set like “add”, “remove”, “insert” that every array
implementation in every language has.  Aren’t those just function around
the existing dynamic array implementation in the compiler?

That is why you need "the magic". The compiler needs to check the type, call
some helper routines etc.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to