[fpc-pascal] Array clearing
Ryan Joseph
ryan at thealchemistguild.com
Wed Apr 12 16:36:40 CEST 2017
> 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?
I have no idea if it’s worth it though. I personally don’t use dynamic arrays directly because they’re too bare bones so adding them at all wasn’t worth it for me. However, if the API was more robust I would start using them instead of my own class/record wrappers.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list