Forum > Suggestions

A modest proposal in response to those who want "curly brackets"

<< < (5/6) > >>

MarkMLl:

--- Quote from: dpremus on February 03, 2021, 11:54:09 pm ---When I was started learning Pascal (Turbo Pascal 3.0 for DOS) there is no curly brackets on my keyboard.

--- End quote ---

:-) Of course, Wirth started working on Pascal using something like an IBM 029 cardpunch (I'm being cautious here since some details of the chronology remain unclear) which similarly lacked braces. If one refers to the earliest version of his report on the language (predating J&W) one finds that he used /* */ as digraphs.

MarkMLl

MarkMLl:

--- Quote from: PascalDragon on February 04, 2021, 09:01:22 am ---Fun fact: FPC handles the replacement for square brackets as well (and obviously the comment style):

--- End quote ---

Am I right in assuming that (* *) shouldn't be considered to be digraphs for { } since (* } and { *) don't work? My recollection is that some things are still picky about which form they use, e.g. macros requite breaces.

MarkMLl

dseligo:

--- Quote from: dpremus on February 03, 2021, 11:54:09 pm ---When I was started learning Pascal (Turbo Pascal 3.0 for DOS) there is no curly brackets on my keyboard.

In that time curly brackets was replaced with local characters for my country so "{"  was replaced with "Š"
and "}" was replaced with "Đ".    :)

--- End quote ---
It looks like we started learning Pascal around same time in the same country.  :)

marcov:

--- Quote from: MarkMLl on February 04, 2021, 09:53:39 am ---
--- Quote from: PascalDragon on February 04, 2021, 09:01:22 am ---Fun fact: FPC handles the replacement for square brackets as well (and obviously the comment style):

--- End quote ---

Am I right in assuming that (* *) shouldn't be considered to be digraphs for { } since (* } and { *) don't work? My recollection is that some things are still picky about which form they use, e.g. macros requite breaces.

--- End quote ---

That is a feature so you can use style B to quickly comment blocks that contain comments in Style A.

It is a feature I regularly miss in C btw, or it is just my ignorance.

MarkMLl:

--- Quote from: marcov on February 04, 2021, 11:24:47 am ---That is a feature so you can use style B to quickly comment blocks that contain comments in Style A.

It is a feature I regularly miss in C btw, or it is just my ignorance.

--- End quote ---

I can't comment on C, but obviously Modula-2 allows comments to be nested... whether or not that is a good thing without an easy way for the programmer to see exactly where the compiler thinks the outer comment stops (i.e. regularly-used listing files etc.) is arguable.

Modern C/C++ compilers are a "triumph of ingenuity over common sense": the language should have been properly-designed in the first place.

MarkMLl

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version