Closed lbensaad closed 9 years ago
the reason all the addX functions are static is because they don't need an object to function. I'm trying to make the API as efficient as possible by not causing object allocation when none is necessary.
The chaining syntax would not work for all fields, since some already return an offset.
I agree this would be lot nicer though.
Yes I agree about efficiency, what about class inheritance model, did you think about it?
I don't see the need for inheritance. In particular, Table's do not need to be dependent on FlatBufferBuilder, you don't need FlatBufferBuilder to read FlatBuffers.
What do you thing of making the API some thing like the following: