[fpc-pascal] Array clearing

Sven Barth pascaldragon at googlemail.com
Wed Apr 12 17:26:42 CEST 2017


Am 12.04.2017 16:51 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
>
>
> > On Apr 12, 2017, at 9:25 PM, Michael Van Canneyt <michael at 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?

Delete() is already supported in trunk, Insert() and the +-operator (or
Concat()) are on the near term ToDo list (mainly out of Delphi
compatibility, though I definitely agree with their existence).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170412/6a8363a8/attachment.html>


More information about the fpc-pascal mailing list