Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #5664

Re: Why C++ is vastly superior to C

From Nobody <nobody@nowhere.com>
Subject Re: Why C++ is vastly superior to C
Date 2011-05-27 07:56 +0100
Message-Id <pan.2011.05.27.06.56.07.250000@nowhere.com>
Newsgroups comp.lang.c++
References (17 earlier) <304d3375-bee0-4977-93ca-d20ffa1ecc00@c1g2000yqe.googlegroups.com> <pan.2011.05.26.17.04.59.234000@nowhere.com> <irm1hl$2m07$1@news.ett.com.ua> <pan.2011.05.26.23.15.07.203000@nowhere.com> <4ddee8d0$0$16153$a729d347@news.telepac.pt>
Organization Zen Internet

Show all headers | View raw


On Fri, 27 May 2011 00:57:04 +0100, Rui Maciel wrote:

>> It's the "natural" indexing operation. The one that has dedicated syntax
>> rather than being a normal method. The one you'll end up using if you
>> convert C code to C++ with minimal re-writing.
> 
> As operator overloading amounts to nothing more than syntax sugar,

Use of the term "nothing more" minimises the significance of syntax.
There's a reason why C++ has "operator" methods when they don't provide
any additional functionality.

The fact that it provides a bounds-checked method does nothing to
eliminate the argument that they made the wrong choice for operator[].
FWIW, I'm not taking any particular side in that argument, I'm just saying
that it exists, and the existence of .at() doesn't change that.

Also, arrays don't have .at(), so if you want to write code which works
with either vectors or arrays, subscript notation is the only option.

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-20 23:43 -0500
  Re: Why C++ is vastly superior to C Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-21 00:47 -0700
    Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-21 08:41 -0500
  Re: Why C++ is vastly superior to C Juha Nieminen <nospam@thanks.invalid> - 2011-05-21 08:22 +0000
    Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-21 08:44 -0500
      Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-21 18:34 +0200
        Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-21 23:37 -0500
          Re: Why C++ is vastly superior to C Juha Nieminen <nospam@thanks.invalid> - 2011-05-22 05:57 +0000
            Re: Why C++ is vastly superior to C Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-22 01:22 -0700
              Re: Why C++ is vastly superior to C Juha Nieminen <nospam@thanks.invalid> - 2011-05-24 15:54 +0000
            Re: Why C++ is vastly superior to C Juha Nieminen <nospam@thanks.invalid> - 2011-05-24 15:58 +0000
              Re: Why C++ is vastly superior to C Leigh Johnston <leigh@i42.co.uk> - 2011-05-24 17:19 +0100
                Re: Why C++ is vastly superior to C Leigh Johnston <leigh@i42.co.uk> - 2011-05-25 14:09 +0100
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-25 15:00 +0100
                Re: Why C++ is vastly superior to C Rune Allnor <allnor@tele.ntnu.no> - 2011-05-26 00:02 -0700
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-26 09:12 +0200
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-26 00:31 -0700
                Re: Why C++ is vastly superior to C hanukas <jukka@liimatta.org> - 2011-05-26 04:53 -0700
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-26 05:24 -0700
                Re: Why C++ is vastly superior to C hanukas <jukka@liimatta.org> - 2011-05-26 23:32 -0700
                Re: Why C++ is vastly superior to C hanukas <jukka@liimatta.org> - 2011-05-26 23:40 -0700
                Re: Why C++ is vastly superior to C Nobody <nobody@nowhere.com> - 2011-05-26 18:05 +0100
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-26 19:10 +0200
                Re: Why C++ is vastly superior to C Nobody <nobody@nowhere.com> - 2011-05-27 00:15 +0100
                Re: Why C++ is vastly superior to C Öö Tiib <ootiib@hot.ee> - 2011-05-26 16:29 -0700
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-27 00:57 +0100
                Re: Why C++ is vastly superior to C Nobody <nobody@nowhere.com> - 2011-05-27 07:56 +0100
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-27 09:41 +0200
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-27 01:20 -0700
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-27 01:51 -0700
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-27 11:01 +0200
                Re: Why C++ is vastly superior to C Juha Nieminen <nospam@thanks.invalid> - 2011-05-28 11:35 +0000
                Re: Why C++ is vastly superior to C "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-05-28 14:41 +0200
                Re: Why C++ is vastly superior to C Ebenezer <woodbrian77@gmail.com> - 2011-05-28 15:42 -0700
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:30 -0500
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:27 -0500
                Re: Why C++ is vastly superior to C Öö Tiib <ootiib@hot.ee> - 2011-05-28 07:55 -0700
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-28 19:19 +0200
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 22:46 -0500
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-26 23:27 -0700
                Re: Why C++ is vastly superior to C hanukas <jukka@liimatta.org> - 2011-05-27 01:12 -0700
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-27 10:24 +0200
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-27 01:44 -0700
                Re: Why C++ is vastly superior to C Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-26 10:28 -0700
                Re: Why C++ is vastly superior to C Michael Doubez <michael.doubez@free.fr> - 2011-05-26 00:34 -0700
                Re: Why C++ is vastly superior to C "Balog Pal" <pasa@lib.hu> - 2011-05-26 10:22 +0200
                Re: Why C++ is vastly superior to C Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-26 00:42 -0700
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-27 00:49 +0100
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 22:57 -0500
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 22:50 -0500
                Re: Why C++ is vastly superior to C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-26 08:53 +0000
                Re: Why C++ is vastly superior to C Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-26 02:16 -0700
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:05 -0500
                Re: Why C++ is vastly superior to C Keith H Duggar <duggar@alum.mit.edu> - 2011-05-26 06:01 -0700
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:11 -0500
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:05 -0500
                Re: Why C++ is vastly superior to C Nobody <nobody@nowhere.com> - 2011-05-26 18:28 +0100
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-27 00:42 +0100
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:13 -0500
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-27 00:30 +0100
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-25 07:20 -0700
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:14 -0500
                Re: Why C++ is vastly superior to C Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-25 23:39 -0700
                Re: Why C++ is vastly superior to C Michael Doubez <michael.doubez@free.fr> - 2011-05-26 00:58 -0700
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:19 -0500
            Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-24 17:42 +0100
              Re: Why C++ is vastly superior to C hanukas <jukka@liimatta.org> - 2011-05-24 23:38 -0700
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-25 11:15 +0100
                Re: Why C++ is vastly superior to C jacob navia <jacob@spamsink.net> - 2011-05-25 13:07 +0200
                Re: Why C++ is vastly superior to C gwowen <gwowen@gmail.com> - 2011-05-25 05:12 -0700
                Re: Why C++ is vastly superior to C Rui Maciel <rui.maciel@gmail.com> - 2011-05-25 15:31 +0100
                Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 23:33 -0500
                Re: Why C++ is vastly superior to C hanukas <jukka@liimatta.org> - 2011-05-25 23:21 -0700
            Re: Why C++ is vastly superior to C "MikeP" <mp011011@some.org> - 2011-05-30 22:44 -0500

csiph-web