From: | "robin" <robin51@dodo.com.au> |
Newsgroups: | comp.compilers |
Date: | Mon, 11 Jun 2012 20:21:09 +1000 |
Organization: | Compilers Central |
References: | 12-03-012 12-03-014 12-06-008 12-06-010 12-06-013 12-06-014 12-06-029 |
Keywords: | syntax, history |
Posted-Date: | 11 Jun 2012 09:36:46 EDT |
From: "Alex McDonald" <blog@rivadpm.com>
> On Jun 7, 1:21 pm, Johann 'Myrkraverk' Oskarsson
> <joh...@2ndquadrant.com> wrote:
>> Another point to make. Why do we assign from right to left? Is it in
>> any way natural? What's wrong with
>>
>> a + b --> c "a plus b assigned to c"
>>
>> instead of
>>
>> c <-- a + b "c becomes a + b?"
>>
>> The more I think about it, I believe the former construct is a bit more
>> natural since we read from left to right. However, I'd want to see or
>> work on a non-trivial project in such a language to make up my mind.
And what about languages that read from the top of the page to the bottom?
> But we already have languages that support
>
> a b + c ! ( stack based, for bang read store )
Indeed, the earliest was Hamblin's GEORGE of 1957,
the above written as a b + (c)
where the parentheses indicated a store operation.
And his loop:
0
1, 10 rep (j)
read
(a)
+
]
print
the meaning of which should be fairly clear as to sum 10 values
and to print that sum.
The square bracket is for end-of-loop.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.