Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #124063
| From | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: address of or reference ? |
| Date | 2026-06-09 01:08 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <1108ak4$3onc2$1@dont-email.me> (permalink) |
| References | <10vtfam$r6s8$1@dont-email.me> <1103v9p$k0c4$5@gwaiyur.mb-net.net> |
On 6/7/2026 9:30 AM, Marcel Mueller wrote: > Am 05.06.26 um 05:20 schrieb Lynn McGuire: >> So which do you prefer for your method parameters that you modify, >> address of or reference ? > > For obligatory parameters I prefer references. > > There is also a slight performance benefit in case of multiple > inheritance (e.g. interfaces): since references must not be null the > null check for upcasts and downcasts can be omitted. > >> We started writing our Windows user interface in the Windows 1.0 era >> using plain old C. I converted it to C++ back in 2001 or so but I >> never used references since I just brought the C code mostly in. > > Another dark chapter. Raw pointers are one of the most risky objects in > C++ code (with a few reasonable exceptions, of course). Basically they > are just an anachronism for compatibility reasons. C++ programmers that > still prefer raw pointers are behind the times. > > > Marcel Raw pointers are good for speed, speed, speed. Lynn
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-04 22:20 -0500
Re: address of or reference ? 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-05 06:26 +0200
Re: address of or reference ? 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-05 06:32 +0200
Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-05 10:58 +0200
Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-05 14:04 -0700
Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-06 12:22 -0700
Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-05 18:28 -0500
Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-06 21:12 +0200
Re: address of or reference ? 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-06 15:28 +0200
Re: address of or reference ? boltar@caprica.universe - 2026-06-06 14:49 +0000
Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-06 12:25 -0700
Re: address of or reference ? boltar@caprica.universe - 2026-06-07 14:42 +0000
Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-07 11:33 -0700
Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-07 11:41 +0200
Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-06 21:21 +0200
Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-06 12:45 -0700
Re: address of or reference ? Paavo Helde <eesnimi@osa.pri.ee> - 2026-06-07 00:30 +0300
Re: address of or reference ? Paavo Helde <eesnimi@osa.pri.ee> - 2026-06-05 19:24 +0300
Re: address of or reference ? Marcel Mueller <news.5.maazl@spamgourmet.org> - 2026-06-07 16:30 +0200
Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-09 01:08 -0500
Re: address of or reference ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-06-09 08:56 +0200
Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-09 18:05 -0500
Re: address of or reference ? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-09 16:42 -0700
Re: address of or reference ? Lynn McGuire <lynnmcguire5@gmail.com> - 2026-06-09 19:37 -0500
Re: address of or reference ? David Brown <david.brown@hesbynett.no> - 2026-06-10 09:21 +0200
Re: address of or reference ? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-06-09 17:03 -0700
Re: address of or reference ? Bonita Montero <Bonita.Montero@gmail.com> - 2026-06-09 08:56 +0200
csiph-web