Remix.run Logo
elch a day ago

If we start playing the "who was first" game, then for the Soviet machine Kiev (Kyiv), an "address language" with a "prime operation" was created in 1957-59.

The prime operation and address mapping.

The prime operation defines a certain single‑argument function. Its symbol (a prime mark) is written above and to the left of the argument: 'a = b where a is the argument and b is the result of the operation. This is read as: "prime a equals b" (or "b is the contents of a"). The argument a is called an address, and the function value b is called the contents of the address. The prime function ' defines a mapping from the set of addresses A to the set of contents B, which we will call an address mapping.

Page 36, chapter III https://torba.infoua.net/files/kateryna-yushchenko/Vychislit...

adrian_b a day ago | parent | next [-]

Pointers and indirect addressing were used in assembly languages and machine languages much earlier than that, perhaps even in some relay-based computers.

In any case, by 1954 already most or all electronic computers used this.

The only priority questions can refer to which are the first high-level programming languages that have used pointers.

In my opinion the first language having pointers with implicit dereferencing was CPL, published in 1963-08, and the first language having pointers with explicit dereferencing was Euler, published completely in 1966-01, but this feature had already been published in 1965-11. The first mainstream programming language, with a large installed base, which had pointers, was the revised IBM PL/I, starting with its version from 1966-07.

Thanks for the link to the book describing the "Kiev" computer. It seems an interesting computer for the year 1957, but it does not have anything to do with the use of pointers in high-level programming languages.

At the page indicated by you there is a description of what appears to be a symbolic assembler. The use of a symbolic assembly language was a great progress at that early date, because many of the first computer programs had been written directly in machine language, or just with a minimal translation, e.g. by using mnemonics instead of numeric opcodes.

However this does not have anything to do with HLL pointers and means to indicate indirect addressing in an assembly language have existed earlier, because they were strictly necessary for any computed that provided indirect addressing in hardware.

In the very first computers, the instructions were also used as pointers, so a program would modify the address field of an instruction, which was equivalent to assigning a new value to a pointer, before re-executing the instruction.

Later, to avoid the re-writing of instructions, both index registers and indirect addressing were introduced. Indirect addressing typically reserved one bit of an address to mark indirection. So when the CPU loaded a word from the memory, if the indirect addressing bit was set, it would interpret the remainder of the word as a new address, from which a new word would be loaded. This would be repeated if the new word also had the indirection bit set.

The assembly languages just had to use some symbol to indicate that the indirection bit must be set, which appears to have been "prime" for "Kiev".

elch 18 hours ago | parent | next [-]

Pity you didn't look a little further, where there was more syntax and semantics... The concept of a high-level language is, of course, relative, but if, for example, someone considers Forth to be an HLL, then imho, the language/formalism from the book about the Kiev machine was definitely one, and it was described in more detail by its chief architect, Katherine Yushchenko, in a book from 1963: https://it-history.lib.ru/TEXTS/Adresnoe-programmirovanie_EY...

If you are still interested, you can look at page 35, where there are several examples, including finding the GCD.

Milpotel 21 hours ago | parent | prev [-]

> the first language having pointers with explicit dereferencing was Euler, published completely in 1966-01

I could only find a manual for PDP-10 Euler with references. Do you have a source for an Euler with pointers?

adrian_b 19 hours ago | parent [-]

"Reference" was the original term used in the languages derived from ALGOL for what is now called "pointer".

The distinction that exists in C++ between "reference" and "pointer" is something very recent. In the past the 2 terms were synonymous.

The term "pointer" was introduced by IBM PL/I in July 1966, where it replaced "reference".

PL/I has introduced many terms that have replaced previously used terms. For example:

reference => pointer

record => structure

process => task

and a few others that I do not remember right now.

"Pointer" and "structure" have become dominant after they have been taken by the C language from PL/I and then C has become extremely popular. Previously "reference" and "record" were more frequently used.

Milpotel 11 hours ago | parent [-]

But the "references" in Euler seem to be close to references nowadays. There is no access to the address, no pointer arithmetic etc. such as in PL/I.

Milpotel a day ago | parent | prev [-]

Nice, and that was implemented and qualifies as high-level language?