Strong opinion on accessors included. -Ivan
http://codereview.chromium.org/261037/diff/3001/4002 File include/v8.h (right): http://codereview.chromium.org/261037/diff/3001/4002#newcode2107 Line 2107: size_t total_heap_size() { return total_heap_size_; } On 2009/10/19 18:49:39, Kevin Millikin wrote: > There's not much gained by making the fields private and having accessors. > Consider just making them public. I strongly disagree. If you make the fields public you have no control which code touches the fields directly. By going through an accessor you can abstract the implementation later without having to hunt down all the clients accessing the data. Also, I would suggest that you make the setter private and friend ImplementationUtilities to allow setting only from within the V8 internal implementation. This is external access to the field is what Kevin was really complaining about (I think). http://codereview.chromium.org/261037 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
