Was taught at Oxford that there were two conventions to writing code, basically the British and American way.
The British way used := for assignment, = for comparison, ; to separate sentences of code, and words to delimit blocks of code: if x = y then z := 1 end;
The American way used = for assignment, ==(=) for comparison, ; to end lines of code, and brackets to delimit blocks of code: if x == y { z = 1; }
Obviously the American way won out, arguably for the best.
Any views either way?
>British vs American
No, I think it's more "Pascal vs C", although there are earlier languages that use that notation.
>>58120464
The British way is probably easier for someone who doesn't program to read; however, the american way looks much cleaner imo
>>58120464
I am British. Fuck the British way of doing anything.
>>58120464
>; to end lines of code
It's not like
A sentence,
Written on many lines,
Is supposed to end
Without dot,
You, dumb Simpsons mutant hand poster.
>>58120464
British have 2 faucets for hot and cold and 2 separate keyboards. One for capped letters. Fuck everything British.
>>58120535
Lemme elaborate on it then
This is the British way:
begin
if x = y then
dothis;
dothat;
andthis;
end;
dosomethingelse
end
--- so entire blocks need to be delimited with semicolons – but only delimited, so the last semicolon is optional. That is why the choice of character was a semicolon: it has the same function in English.
>>58120544
>>58120551
>>58120493
Pascal and C just became the most popular languages to come from the two types. The difference was sort of born from two different methods used in the two different countries