(Granted I am touch typing and also using Colemak layout, so rarely ever move my hands. For people that hunt and pek, I believe curly braces are easier to type.)
I don't think there is much practical difference between curly-braced vs keyboard based syntax. Both are similarly easy to read, especially with syntax highlighting. After a while, your brain will automatically parse "begin" and "end" as a symbol, same as curly braces, so you won't notice the "noise".
As for the pros and cons:
Pascal style syntax is slightly better for new people learning to program. Learning how to even type those weird curly braces and understanding the difference between all the styles of braces just takes focus away from actually learning how to program.
Curly braced C-style syntax is better for people that already know how to program because everyone is already familiar with at least one curly braced language.
For 35+ years I’ve been using right-shift for things on the right side of the board, cranking my hand and stretching my fingers and complaining about programming languages with poor typing ergonomics.
It’s taking forever to break the habit, but so far it feels so much better.
I didn't know it at the time, but that one semester class was immensely useful for me throughout my career.
The teacher was a bored and unpleasant secretary and the typewriters were mechanical (and the shift keys so heavy for our pinkies) but it was still the most useful thing I did in school since I learned to read in first grade.
I've not been very successful changing this habit.
I think playing video games has made LeftShift + letter a really easy combo, right shift feels quite uncomfortable, but I did find that I use it when typing !
Type, maybe, but they are visual noise when you read code.
BEGIN and END are also not as easy to match with editors/IDE's as pairs of symbols.
Of course some people can't read words by shape and instead have to sound out the individual letters every time, so I guess it can be more annoying for some people.
And I don't mean to be patronizing, I actually have the opposite problem. I am faster at parsing whole words than symbols which is why I really struggle with modern UI that solely relies on icons. It drives me mad.
so, logically, they must have learned how to use {} in the first place, probably with few problems.
i have taught god-knows how many people c and c++ (used to be a commercial trainer for those languages) and i can assure you that very, very few, if any, had problems with {}.
For example, to call a function, we just use the name of the function and parentheses, rather than saying "call". This is useful, because it allows the reader to focus on what is of interest.
https://www.microfocus.com/en-us/products/visual-cobol/overv...
speaking as an ex professional delphi programmer here - i have written lots of object pascal code, and have no desire to write any more.
but to be pedantic, i think you mean define rather than declare, though of course you can also declare things at different scopes.
int x;
f();
x=3;
The improvement was allowing declarations anywhere.(I assume f() is a call.)
If you try to use `x` before it is defined (the assignment) your compiler should give you a warning, at least. If it doesn't, find a new compiler.
> A definition of an identifier is a declaration for that identifier that:
> — for an object, causes storage to be reserved for that object; [...]
But initialization (in C) does not occur for block-scope objects without the optional initializer.
proc Something()
begin
...
end Something
not the interface/impl declarations. Which actually makes this worse.How about a treesitter-based editor extension that converts between begin/end and {/}, as if they were ligatures? Actually this might not even need treesitter.
See emacs prettify-symbols-mode (https://emacs.stackexchange.com/questions/46529/configuring-...)
Rochus is almost kind of doing this with Oberon+ versus Wirthian Oberon already, but it would be nice to go further.
Neovim has the conceal feature, which can convert Treesitter nodes into a single symbol, but not the other way around unfortunately.