Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #10048
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: OS Design thinking in objects? |
| Date | 2019-07-04 19:15 +0100 |
| Organization | Fix this later |
| Message-ID | <qflfnv$gdk$1@dont-email.me> (permalink) |
| References | <77714daf-c2c3-4bc0-b547-5bd2939c562e@googlegroups.com> <qfhqd9$2gl$1@gioia.aioe.org> <664449a1-9663-4f87-93fb-c0d2782f8957@googlegroups.com> |
On 03/07/2019 22:43, G G wrote: <snip> > funny to me the counting starting at 0 has been > a major cause of errors in the lang forever instead of making that small change > they insist people will get use to it. of they will, but not eliminate the cause > to start with. Fortran and COBOL are 1-based, with the result that array indexing code in these languages tends to be clumsy and awkward. Given that p points to (contains the address of the beginning element of) an array, it is very natural and convenient to address other members of that array using p + offset, and clearly the beginning element has offset 0. If you label the elements using 1-based notation, 1, 2, 3 etc, then somewhere down the line you have to subtract one from the label to get the offset, which is inefficient and unnecessary. But if you want to use Fortran or COBOL, nobody's stopping you. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
OS Design thinking in objects? G G <gdotone@gmail.com> - 2019-07-02 16:12 -0700
Re: OS Design thinking in objects? "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2019-07-03 10:52 +0200
Re: OS Design thinking in objects? Horizon68 like Menz <cdalten@gmail.com> - 2019-07-03 05:16 -0700
Re: OS Design thinking in objects? Horizon68 like Menz <cdalten@gmail.com> - 2019-07-03 05:17 -0700
Re: OS Design thinking in objects? G G <gdotone@gmail.com> - 2019-07-03 14:45 -0700
Re: OS Design thinking in objects? Horizon68 like Menz <cdalten@gmail.com> - 2019-07-04 16:25 -0700
Re: OS Design thinking in objects? G G <gdotone@gmail.com> - 2019-07-03 14:43 -0700
Re: OS Design thinking in objects? nobody@example.org (Scott) - 2019-07-04 17:45 +0000
Re: OS Design thinking in objects? Richard Heathfield <rjh@cpax.org.uk> - 2019-07-04 19:15 +0100
csiph-web