Op 2020-06-22 om 14:05 schreef Sven Barth via fpc-pascal:
Anthony Walter via fpc-pascal <fpc-pascal@lists.freepascal.org <mailto:fpc-pascal@lists.freepascal.org>> schrieb am Mo., 22. Juni 2020, 06:29:

    Great news and thank you to all the developers! I carefully read
    through the notes and look forward to using the new array methods
    and also the management operators.

    One question to everyone though, what use cases do you see for the
    IsManagedType intrinsic?


Mainly generics. E.g. when dealing with arrays you can simply do a Move() for non managed types, while for managed types you need to do it by element.
Not just that, consider e.g. something like tlist<t>   if "T" requires management, a tlist<t>.clear must finalize all elements. If it is a pure value type, it doesn't, and can skip the whole loop. Afaik fcl-stl has some examples of that.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to