Re: Const correctness?
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAF63+7VNaqf9Kwmy_eK+XSVfvZbkaR3cpstDXDLznv-UmJ=a+g@mail.gmail.com> |
Plus, in C there's no way to correctly annotate a function like cairo_reference(). In C++ you can define a version taking const and a non-const version. In C, you can't. On Fri, Feb 17, 2017 at 10:44 AM, Lawrence D'Oliveiro < [email protected]> wrote: > On Fri, 17 Feb 2017 09:01:44 -0800, Bryce Harrington wrote: > > > Perhaps at that time the usefulness of > > const'ing parameters was not held as a consensus of the developers at > > that time. > > You have to distinguish between interface and implementation. C doesn’t > offer any way to say that any modifications to the object are not > visible to the user. > -- > cairo mailing list > [email protected] > https://lists.cairographics.org/mailman/listinfo/cairo > -- behdad http://behdad.org/ -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo