views:

50

answers:

4

I was just reading a bit about the HQ9+ programming language ( http://esolangs.org/wiki/HQ9 , http://en.wikipedia.org/wiki/HQ9%2B and http://www.cliff.biffle.org/esoterica/hq9plus.html ), and it tells me something about a so called 'accumulator' which can be incremented, but not be accessed. Also, using the + doesn't manipulate the result:

code

H+H

result

Hello World
Hello World

Can anyone explain me how this works, what this does and if it even makes any sense? Thanks

+3  A: 

Having written an implementation, I think I can say without a doubt that it makes no sense at all. I advise you to not worry about it; it's a very silly language after all.

Donal Fellows
I do need to know what it excactly does hehe. I am writing an interpreter for it :x
Time Machine
@Konig - based on the description of the language it seems rather useless and you can probably do whatever you want with the + as long as it doesn't affect anything else. I would just ignore it in the implementation since incrementing something you can't access makes no sense.
SB
+1  A: 

It increments something not accessible, not spec-defined, and apparently not really even used. I'd say you can implement it however you want or possibly not at all.

Dinah
+2  A: 

It's a joke.

There's also an object-oriented extension of HQ9+, called HQ9++. It has a new command ++ which instantiates an object, and, for reasons of backwards-compatibility, also increments the accumulator register twice. And again, since there is no way to store, retrieve, access, manipulate, print or otherwise affect an object, it's completely useless.

Jörg W Mittag
A: 

What everyone else said is correct, and I would just like to add: It's just a silly nothing; you can call any incremented variable an "accumulator" because that is its function.

Mark C