Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #705
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
| Newsgroups | comp.lang.java.help |
| Subject | Re: [OT] Re: Why would one use += 1 at the place of ++? |
| Date | Thu, 19 May 2011 23:13:59 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 36 |
| Message-ID | <ir4mca$bpp$1@dont-email.me> (permalink) |
| References | <8762p7upgn.fsf@merciadriluca-station.MERCIADRILUCA> <4t6Bp.534$pi2.511@newsfe11.iad> <ir30ui$jok$1@dont-email.me> <pogBp.33197$Vp.31432@newsfe14.iad> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 20 May 2011 03:15:22 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="BrOwaJANne849xlH+KPYjQ"; logging-data="12089"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BUFAdBv49WLLJq6b+8Arj" |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
| In-Reply-To | <pogBp.33197$Vp.31432@newsfe14.iad> |
| Cancel-Lock | sha1:5pvSh9wD5ACpfrph05t2wtev+ac= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.help:705 |
Show key headers only | View raw
On 5/19/2011 5:58 PM, David Lamb wrote:
> On 19/05/2011 8:03 AM, Eric Sosman wrote:
>> On 5/19/2011 6:40 AM, David Lamb wrote:
>>> [...]
>>> I think ++ exists only because the hardware on which C was developed had
>>> an addressing mode that did it atomically in the very special case of
>>> referring to
>>> something = array[index++];
>>
>> FWIW, some guy named Dennis Ritchie says this is not true.
>
> He ought to know.
>
>> "People often guess that [++ and --]were created to use the
>> auto-increment and auto-decrement address modes provided
>> by the DEC PDP-11 on which C and Unix first became popular.
>> This is historically impossible, since there was no PDP-11
>> when B was developed."
>
> I had the idea that this arose from some machine where lowest small
> number of locations in memory had some form of autoincrementing when you
> used them as array indices, but that sounds so weird I may be
> hallucinating.
Ritchie mentions such a machine (the PDP-7), but also says the
special hardware was not actually used in the implementations of ++
and -- (either prefix or postfix). He speculates that they might have
put the idea into Thompson's head, though. The full paper is at
http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
for folks of an archaeological bent.
--
Eric Sosman
esosman@ieee-dot-org.invalid
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar
Why would one use += 1 at the place of ++? Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-05-19 09:19 +0200
Re: Why would one use += 1 at the place of ++? Bent C Dalager <bcd@pvv.ntnu.no> - 2011-05-19 10:22 +0000
Re: Why would one use += 1 at the place of ++? David Lamb <dalamb@cs.queensu.ca> - 2011-05-19 06:40 -0400
Re: Why would one use += 1 at the place of ++? Jeff Higgins <jeff@invalid.invalid> - 2011-05-19 07:58 -0400
[OT] Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 08:03 -0400
Re: [OT] Re: Why would one use += 1 at the place of ++? Patricia Shanahan <pats@acm.org> - 2011-05-19 07:35 -0700
Re: [OT] Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 22:57 -0400
Re: [OT] Re: Why would one use += 1 at the place of ++? rossum <rossum48@coldmail.com> - 2011-05-20 11:00 +0100
Re: [OT] Re: Why would one use += 1 at the place of ++? Patricia Shanahan <pats@acm.org> - 2011-05-20 12:55 -0700
Re: [OT] Re: Why would one use += 1 at the place of ++? David Lamb <dalamb@cs.queensu.ca> - 2011-05-19 17:58 -0400
Re: [OT] Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 23:13 -0400
Re: Why would one use += 1 at the place of ++? Lew <noone@lewscanon.com> - 2011-05-19 08:43 -0400
Re: Why would one use += 1 at the place of ++? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-19 07:51 -0400
Re: Why would one use += 1 at the place of ++? Jeff Higgins <jeff@invalid.invalid> - 2011-05-19 08:03 -0400
Re: Why would one use += 1 at the place of ++? Lew <noone@lewscanon.com> - 2011-05-19 08:08 -0400
Re: Why would one use += 1 at the place of ++? Roedy Green <see_website@mindprod.com.invalid> - 2011-05-19 10:23 -0700
Re: Why would one use += 1 at the place of ++? Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-05-19 21:15 +0200
Re: Why would one use += 1 at the place of ++? Lew <noone@lewscanon.com> - 2011-05-19 15:29 -0400
csiph-web