News for hackers. Stuff that matters.
Re:Gobs of data (2011) by lsaferite on Tuesday December 05, 2023 @02:21AM (#38527983)
> Sending top-level arrays instead of sending them inside a struct is never the right way.

While I understand the sentiment, I 100% disagree on the 'never' qualifier.

Re:Gobs of data (2011) by orf on Tuesday December 05, 2023 @09:39AM (#38531328)
Depending on if the format you use is self-describing or not, it’s possible “sending a plain array” and “sending a struct with 1 field that is an array” could have the same format on the wire.

If it is self describing, the overhead could be very very minimal.

So, why would you want to send a plain array without wrapping it in a struct?