[C++-sig] Retiring "ref", etc.
joel de guzman
djowel at gmx.co.uk
Mon Jun 10 22:04:38 CEST 2002
----- Original Message -----
From: "David Abrahams"
> > object: cannot be null [high level interface]
> > object_ptr: can be null [low level interface]
>
> The problem is that object_ptr needs to be parametrized on the type it's
> pointing at (e.g. PyObject, PyTypeObject...). object_ptr<PyObject> is
> redundant and object_ptr<PyTypeObject> is sort-of inaccurate.
>
> So my latest thought is that the smart pointer class is spelled "handle",
> and the one currently spelled "ref" is spelt "handle<>". I could supply
>
> typedef handle<> obj_ptr;
>
> or
>
> typedef handle<> hdl;
>
> or
>
> typedef handle<> objptr;
>
> but I'm resisting: I hate unpronounceable names.
Yes. You wrote the naming guidelines ;-)
"handle" is nice! How about:
typedef handle<PyObject> object_ptr;
typedef handle<PyTypeObject> type_ptr;
Cheers,
--Joel
More information about the Cplusplus-sig
mailing list