Okay, I tried wrangling some List code. Before we say au revoir to PgList, List needs to have a few convenience functions, and one of those needs to be List::new_in. I shouldn't have to specify how to make a nullptr! Also, you shouldn't need to use the memcx as an argument for the push after just naming the memcx a line ago, but I'm less certain of how to design that. I'll think about the API a bit, since I think Postgres code will never expect, and thus never correctly handle, a 0-length, N-capacity List, so it needs to prevent the simplest mistake of reserving such.
Okay, I tried wrangling some
List
code. Before we say au revoir to PgList,List
needs to have a few convenience functions, and one of those needs to beList::new_in
. I shouldn't have to specify how to make a nullptr! Also, you shouldn't need to use the memcx as an argument for the push after just naming the memcx a line ago, but I'm less certain of how to design that. I'll think about the API a bit, since I think Postgres code will never expect, and thus never correctly handle, a 0-length, N-capacity List, so it needs to prevent the simplest mistake of reserving such.