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


Groups > comp.lang.c > #77110

Re: should c be a subset of c++?

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: should c be a subset of c++?
Date 2015-11-24 09:09 -0800
Organization None to speak of
Message-ID <lnvb8r1fz7.fsf@kst-u.example.com> (permalink)
References (15 earlier) <e84c14ad-9d11-4b42-a2d9-c505e1251449@googlegroups.com> <lnoaerfd1i.fsf@kst-u.example.com> <2c2e0fab-bb94-419c-b92c-2933340e4e16@googlegroups.com> <MPG.30bdd286eb6edd97ad@news.eternal-september.org> <4e2eb610-1853-451f-95c2-d30687ff3bd6@googlegroups.com>

Show all headers | View raw


Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
[...]
> There's a case for banning the lot, and not having pointer arithmetic
> other than pointer differences. You could still generate pointers
> with &array[i];
> There are just one or two places you need ptr -1, for example in a typical
> malloc() implementation where the control block is before the pointer.
>  
> If data is in an array, it makes sense to access it using array subscripts.
> If it's not in an array, pointer arithmetic is pointless.

Ok, so you don't like C.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: should c be a subset of c++? "J. Clarke" <j.clarke.873638@gmail.com> - 2015-11-06 19:06 -0500
  Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 00:41 -0800
    Re: should c be a subset of c++? Richard Damon <Richard@Damon-Family.org> - 2015-11-07 10:01 -0500
      Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 09:12 -0800
        Re: should c be a subset of c++? Martin Shobe <martin.shobe@yahoo.com> - 2015-11-07 11:58 -0600
          Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 10:25 -0800
            Re: should c be a subset of c++? Keith Thompson <kst-u@mib.org> - 2015-11-07 11:54 -0800
              Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-07 14:22 -0800
                Re: should c be a subset of c++? Martin Shobe <martin.shobe@yahoo.com> - 2015-11-08 13:05 -0600
                Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-08 11:39 -0800
                Re: should c be a subset of c++? Geoff <geoff@invalid.invalid> - 2015-11-13 13:20 -0800
                Re: should c be a subset of c++? James Kuyper <jameskuyper@verizon.net> - 2015-11-13 16:36 -0500
                Re: should c be a subset of c++? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-14 00:03 +0000
                Re: should c be a subset of c++? Geoff <geoff@invalid.invalid> - 2015-11-13 17:06 -0800
                Re: should c be a subset of c++? Geoff <geoff@invalid.invalid> - 2015-11-13 13:29 -0800
            Re: should c be a subset of c++? Martin Shobe <martin.shobe@yahoo.com> - 2015-11-08 12:57 -0600
              Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-08 11:37 -0800
                Re: should c be a subset of c++? Keith Thompson <kst-u@mib.org> - 2015-11-08 17:16 -0800
                Re: should c be a subset of c++? supercat@casperkitty.com - 2015-11-08 18:19 -0800
                Re: should c be a subset of c++? Martin Shobe <martin.shobe@yahoo.com> - 2015-11-08 23:25 -0600
                Re: should c be a subset of c++? Gareth Owen <gwowen@gmail.com> - 2015-11-10 22:34 +0000
        Re: should c be a subset of c++? raltbos@xs4all.nl (Richard Bos) - 2015-11-13 22:18 +0000
          Re: should c be a subset of c++? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-14 00:11 +0000
            Re: should c be a subset of c++? raltbos@xs4all.nl (Richard Bos) - 2015-11-17 22:16 +0000
              Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-17 21:09 -0800
                Re: should c be a subset of c++? Richard Heathfield <rjh@cpax.org.uk> - 2015-11-18 05:22 +0000
                Re: should c be a subset of c++? Keith Thompson <kst-u@mib.org> - 2015-11-18 06:03 -0800
                Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-18 08:44 -0800
                Re: should c be a subset of c++? Keith Thompson <kst-u@mib.org> - 2015-11-18 09:11 -0800
                Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-18 09:54 -0800
                Re: should c be a subset of c++? Philip Lantz <prl@canterey.us> - 2015-11-24 01:49 -0800
                Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-24 02:58 -0800
                Re: should c be a subset of c++? raltbos@xs4all.nl (Richard Bos) - 2015-11-24 11:58 +0000
                Re: should c be a subset of c++? Keith Thompson <kst-u@mib.org> - 2015-11-24 09:09 -0800
                Re: should c be a subset of c++? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-25 00:12 -0800
                Re: should c be a subset of c++? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-25 12:35 +0000
                Re: should c be a subset of c++? raltbos@xs4all.nl (Richard Bos) - 2015-11-27 16:30 +0000
                Re: should c be a subset of c++? raltbos@xs4all.nl (Richard Bos) - 2015-11-19 10:37 +0000
                Re: should c be a subset of c++? Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-20 15:40 -0800
  Re: should c be a subset of c++? Gareth Owen <gwowen@gmail.com> - 2015-11-10 22:20 +0000

csiph-web