Tagging of arguments ref/out, or just out

Ziad Hatahet hatahet at gmail.com
Mon Aug 8 17:03:59 PDT 2011


FWIW, Google's C++ style guide explicitly requires passing pointers to
arguments (whenever possible) when they are to be modified or used as out
parameters, and passed by const& when they are not. This makes it more
obvious at the caller's end which parameters are going to be modified and
which ones aren't.

--
Ziad


On Mon, Aug 8, 2011 at 12:23 PM, Kagamin <spam at here.lot> wrote:

> KennyTM~ Wrote:
>
> > I disagree. If you want to save keystrokes, use Perl.
>
> Perl is dynamically typed, right? D is statically typed, so it can
> statically check most things like out variables won't overwrite const
> arguments.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110808/fa621786/attachment-0001.html>


More information about the Digitalmars-d mailing list