[Cubicweb] Understanding _cw
nicolas.chauvat at logilab.fr
Thu May 15 20:19:42 CEST 2014
On Thu, May 15, 2014 at 09:49:49AM +0200, Aurélien Campéas wrote:
> On 15/05/2014 09:25, Denis Laxalde wrote:
> > aurélien campéas a écrit :
> >> Whatever the future holds for _cw, I'd very much like it were re-cast as
> >> just 'cw'.
> > At this point, using a descriptive name wouldn't hurt.
> Yes it would. "cubicweb_god_object" is descriptive but too long.
1) _cw is short and that is a quality for a name that is used a lot
cw would be shorter, but make it less obvious that it is a private
2) _cw and cw_* are reserved words in the namespace of attributes of
AppObjects. It should be documented somewhere. A design goal when
putting everything in _cw and cw_* was to prevent conflicts with
attributes and relation names used in the schema definition.
logilab.fr - services en informatique scientifique et gestion de connaissances
More information about the Cubicweb