Recent

Author Topic: A modest proposal in response to those who want "curly brackets"  (Read 6789 times)

prof7bit

  • Full Member
  • ***
  • Posts: 140
Re: A modest proposal in response to those who want "curly brackets"
« Reply #30 on: September 25, 2021, 11:48:53 am »
It doesn't get mentioned very often but one important point I noticed is this: For many people with one of the European keyboard layouts the curly braces are a major PITA! On my German keyboard I have blindly typed "begin" <Enter> faster than It takes me to bend my fingers into the weird position that is needed to type "{".

This is probably one of the reason why Pascal is much more popular in Europe than in USA. And why Americans are unable to see why anybody would have a problem with {}.

It is also one of the reasons I personally also gravitate towards other languages that do NOT use curly braces or any other symbols or keywords for block delimiting at all, for example Python proves that they are indeed not needed at all and their omission only improves the usability of the language. I rather have scanner and parser do the hard work to figure out the blocks than having the person in front of the keyboard having to do extra work for the convenience of the computer. After all these machines were invented to work for humans, not the other way around!

MarkMLl

  • Hero Member
  • *****
  • Posts: 3264
Re: A modest proposal in response to those who want "curly brackets"
« Reply #31 on: September 25, 2021, 12:18:55 pm »
Well of course, when Wirth hurriedly defined Pascal keypunches (almost universally made by IBM, even if rebadged) rarely had braces ("curly brackets" to the unwashed). The result was that he initially allowed BCPL-style /* */ as digraphs to enclose a comment, before characteristically deciding to break an existing convention and use (* *) instead. I believe that there has been earlier discussion of the extent to which FPC (etc.) distinguishes between digraphs and lexemes in this situation.

Finally, I would remind everybody that I started this thread as a focus for the "braces vs begin-end" discussion, and as somewhere that the next irritating tyro who suggested a gross change could be pointed. And while I tried to make the arguments in my initial post fairly robust, I chose the subject name carefully: would anybody unfamiliar with the trope please read https://en.wikipedia.org/wiki/A_Modest_Proposal and consider my points in that context.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 10929
Re: A modest proposal in response to those who want "curly brackets"
« Reply #32 on: September 25, 2021, 12:24:24 pm »
"Everything is a comment" then?
« Last Edit: September 25, 2021, 02:07:25 pm by Thaddy »
The average programmer productivity is 4-5 hours per day. Peak performance 72 hours for short bursts. MTBF is 1 second or less.

MarkMLl

  • Hero Member
  • *****
  • Posts: 3264
Re: A modest proposal in response to those who want "curly brackets"
« Reply #33 on: September 25, 2021, 12:31:48 pm »
"Life is an isthmus"
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 10929
Re: A modest proposal in response to those who want "curly brackets"
« Reply #34 on: September 25, 2021, 02:10:02 pm »
It is more like "limitata"  :D

(A very narrow way of thinking, in latin )
The average programmer productivity is 4-5 hours per day. Peak performance 72 hours for short bursts. MTBF is 1 second or less.

VTwin

  • Hero Member
  • *****
  • Posts: 1061
  • Former Turbo Pascal 3 user
Re: A modest proposal in response to those who want "curly brackets"
« Reply #35 on: September 25, 2021, 05:21:07 pm »
Using Code Templates I type "b<return>" and get:

Code: Pascal  [Select][+][-]
  1. begin
  2.   |
  3. end;

Two key presses for an indented code block.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.12 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.12 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.12 (64 bit on VBox)

 

TinyPortal © 2005-2018