I started to create languages of my own in 1981. Then I thought it was
cool to use syntax elements and a few concepts from Algol68, even
though my language was much smaller and much simpler.
That is still the case, and I have been happy to acknowledge the influence.
However, that has now changed. My views of Algol68 have changed significantly. I think now that while it introduced some fresh ideas,
the language itself is dreadful, it looks terrible, forces
unnecessarily complex ideas upon you, and is overly pedantic in its
syntax.
The recent discussions with its aficionados have been unpleasant. They
have a proprietorial attitude to the language, staunchly defend ALL of
it complexity, and insult anyone who questions the need to grapple with
that complexity, such as calling them morons.
So, I have decided cut any ties with that language.
Mine is anyway already vastly different, and still simpler and easier
while having dozens of more practical features.
FI OD and CASE
I've always used these (usually in lower case - I don't have that
stropping nonsense), but I also allow END, END IF and so on.
On 2025-11-08 16:16:04 +0000, bart said:
I started to create languages of my own in 1981. Then I thought it was
cool to use syntax elements and a few concepts from Algol68, even
though my language was much smaller and much simpler.
That is still the case, and I have been happy to acknowledge the
influence.
However, that has now changed. My views of Algol68 have changed
significantly. I think now that while it introduced some fresh ideas,
the language itself is dreadful, it looks terrible, forces
unnecessarily complex ideas upon you, and is overly pedantic in its
syntax.
I think the complexity of the language matters less than the comlexity of
the definition of the language.
The recent discussions with its aficionados have been unpleasant. They
have a proprietorial attitude to the language, staunchly defend ALL of
it complexity, and insult anyone who questions the need to grapple
with that complexity, such as calling them morons.
So, I have decided cut any ties with that language.
Mine is anyway already vastly different, and still simpler and easier
while having dozens of more practical features.
FI OD and CASE
I've always used these (usually in lower case - I don't have that
stropping nonsense), but I also allow END, END IF and so on.
I think no synonymes is better. And END IF, END LOOP, &c. is better.
I would say it is a matter of taste whether you use "if .. fi", "if ... end", "if ... end if", "if ... begin ... end", "if ... { ... }", or something else entirely.
On 09/11/2025 11:30, Mikko wrote:
On 2025-11-08 16:16:04 +0000, bart said:
I started to create languages of my own in 1981. Then I thought it
was cool to use syntax elements and a few concepts from Algol68, even
though my language was much smaller and much simpler.
That is still the case, and I have been happy to acknowledge the
influence.
However, that has now changed. My views of Algol68 have changed
significantly. I think now that while it introduced some fresh ideas,
the language itself is dreadful, it looks terrible, forces
unnecessarily complex ideas upon you, and is overly pedantic in its
syntax.
I think the complexity of the language matters less than the comlexity of
the definition of the language.
The recent discussions with its aficionados have been unpleasant.
They have a proprietorial attitude to the language, staunchly defend
ALL of it complexity, and insult anyone who questions the need to
grapple with that complexity, such as calling them morons.
So, I have decided cut any ties with that language.
Mine is anyway already vastly different, and still simpler and easier
while having dozens of more practical features.
FI OD and CASE
I've always used these (usually in lower case - I don't have that
stropping nonsense), but I also allow END, END IF and so on.
I think no synonymes is better. And END IF, END LOOP, &c. is better.
I would say it is a matter of taste whether you use "if .. fi", "if ... end", "if ... end if", "if ... begin ... end", "if ... { ... }", or something else entirely. But I think it is best to be consistent.
Synonyms or alternatives here are a bad idea - they lead to inconsistent source code that is harder to other people to read and maintain.
On 09/11/2025 11:22, David Brown wrote:
On 09/11/2025 11:30, Mikko wrote:
On 2025-11-08 16:16:04 +0000, bart said:
I started to create languages of my own in 1981. Then I thought it
was cool to use syntax elements and a few concepts from Algol68,
even though my language was much smaller and much simpler.
That is still the case, and I have been happy to acknowledge the
influence.
However, that has now changed. My views of Algol68 have changed
significantly. I think now that while it introduced some fresh
ideas, the language itself is dreadful, it looks terrible, forces
unnecessarily complex ideas upon you, and is overly pedantic in its
syntax.
I think the complexity of the language matters less than the
comlexity of
the definition of the language.
The recent discussions with its aficionados have been unpleasant.
They have a proprietorial attitude to the language, staunchly defend
ALL of it complexity, and insult anyone who questions the need to
grapple with that complexity, such as calling them morons.
So, I have decided cut any ties with that language.
Mine is anyway already vastly different, and still simpler and
easier while having dozens of more practical features.
FI OD and CASE
I've always used these (usually in lower case - I don't have that
stropping nonsense), but I also allow END, END IF and so on.
I think no synonymes is better. And END IF, END LOOP, &c. is better.
I would say it is a matter of taste whether you use "if .. fi",
"if ... end", "if ... end if", "if ... begin ... end", "if ...
{ ... }", or something else entirely. But I think it is best to be
consistent. Synonyms or alternatives here are a bad idea - they lead
to inconsistent source code that is harder to other people to read and
maintain.
Is this about what's enforced by the language, or guidelines?
If a language always requires exactly 'end if' for example, that is
going to be major annoyance for a lot of people.
However one the worst examples of too much choice must be optional- brace-style as popularised by C (although this can also happen with BEGIN-END). First it allows these combinations:
if () else ;
if () {} else;
if () else {}
if () {} else {}
(I won't comment on the semicolons.)
But then, so many tokens can lead to an explosion of placement styles.
At least with END-delimited syntax, it easy to see that all you need is:
if then else end
That is, the first block is already delimited by then-else, you only
need to delimit the last. Doing this with braces doesn't really work:
if () else }
Than unmatched } looks weird. And you still need some delimiter between condition and the first block, either ) or {.
So I think END style is generally better than braces, and better than indent-based, which has its own set of problems.
On 09/11/2025 15:09, bart wrote:
So I think END style is generally better than braces, and better than
indent-based, which has its own set of problems.
"end style" or braces is a matter of choice. I like braces, and find
them visually clearer and more suited to a clear and consistent
indentation style. What I would not support is allowing the user to
choose "end", "end if", or "fi" according to preference - the language should use one and only one style.
On 09/11/2025 14:40, David Brown wrote:
On 09/11/2025 15:09, bart wrote:
So I think END style is generally better than braces, and better than
indent-based, which has its own set of problems.
"end style" or braces is a matter of choice. I like braces, and find
them visually clearer and more suited to a clear and consistent
indentation style. What I would not support is allowing the user to
choose "end", "end if", or "fi" according to preference - the language
should use one and only one style.
There is another aspect to this.
My view is that matching bracket delimiters of any kind are best suited
to be used within the same line.
For delimiting content across multiple lines, as happens with braces, I think they are poor. They are too insubstantial for a start.
For this reason, I sometimes provide compact alternatives, so there are short forms and long forms, example:
record date1 = (int d, m, y)
record date2 =
int d
int m
int y
end
This doesn't stop anyone using a short form across multiple lines, or
long form on one line; I assume they'll be sensible.
This is a choice I provide. But you can remove the option, and still
find people imposing their own preferences. You'd need an ultra-strict syntax to enforce layout.
Or there are always refactoring tools.
On 09/11/2025 16:17, bart wrote:
For this reason, I sometimes provide compact alternatives, so there
are short forms and long forms, example:
record date1 = (int d, m, y)
record date2 =
int d
int m
int y
end
This doesn't stop anyone using a short form across multiple lines, or
long form on one line; I assume they'll be sensible.
I think that is a bad idea. For one task, pick one good solution.
People can lay things out as they want, but the syntax should remain the same.
I think the complexity of the language matters less than the comlexity
of the definition of the language.
My view is that matching bracket delimiters of any kind are best
suited to be used within the same line.
On Sun, 9 Nov 2025 15:17:54 +0000, bart wrote:
My view is that matching bracket delimiters of any kind are best
suited to be used within the same line.
How do you build complex data structures, then? Such structures are
very common in data-driven programming. E.g.
Note that if such data is machine-generated and machine-processed, then
I don't have any objection to using brackets.
On Mon, 10 Nov 2025 00:56:05 +0000, bart wrote:
Note that if such data is machine-generated and machine-processed, then
I don't have any objection to using brackets.
That table example of mine was very much human-generated and human- maintained.
We have discussed machine-generated data before; as I said then, I feel
such things, particularly long screeds of inscrutable-looking numbers,
have no place in human-maintained source code.
I also have a small problem with all those trailing commas.
On Mon, 10 Nov 2025 01:12:10 +0000, bart wrote:
I also have a small problem with all those trailing commas.
I don’t. I use them to indicate that there’s nothing special about the last item in the list, you can add more after that if you want. This
is usually the case in high-level languages.
In C code, on the other hand, the last item in an array is often a
sentinel to indicate the end of the list, e.g.
static PyMethodDef discipline_methods[] =
{
{"makedict", discipline_makedict, METH_VARARGS,
"makedict(«tuple of pairs», «message»)\n\n"
"displays a message and makes a dictionary from a tuple"
" of (key, value) pairs. Raises a ValueError exception if"
" any key or value is ExceptMe."
},
{"factorize", discipline_factorize, METH_VARARGS,
"factorize(«n»)\n\n"
"returns a tuple of integer pairs («i», «r») representing the"
"prime factors of positive integer «n», where «i» is a prime"
" number and «r» is the number of times «i» occurs as a factor"
" of «n». Raises a ValueError exception if any «i» or «r» equals 5."
},
END_STRUCT_LIST
};
That lack of a comma means you shouldn’t be adding anything after that
last item.
On 10/11/2025 04:51, Lawrence D’Oliveiro wrote:
On Mon, 10 Nov 2025 01:12:10 +0000, bart wrote:
I also have a small problem with all those trailing commas.
I don’t. I use them to indicate that there’s nothing special about the >> last item in the list, you can add more after that if you want. This
is usually the case in high-level languages.
Trailing commas also make such tables and lists easier to maintain. You can cut, copy and paste more easily, and adding new items only affects
the new lines - it does not mean changing existing lines. In a world of git, svn, and other version control software, it is a significant
advantage if changes to code only affect the lines that have a
meaningful change.
In C code, on the other hand, the last item in an array is often a
sentinel to indicate the end of the list, e.g.
static PyMethodDef discipline_methods[] =
{
{"makedict", discipline_makedict, METH_VARARGS,
"makedict(«tuple of pairs», «message»)\n\n"
"displays a message and makes a dictionary from a tuple"
" of (key, value) pairs. Raises a ValueError exception if"
" any key or value is ExceptMe."
},
{"factorize", discipline_factorize, METH_VARARGS,
"factorize(«n»)\n\n"
"returns a tuple of integer pairs («i», «r») representing
the"
"prime factors of positive integer «n», where «i» is a
prime"
" number and «r» is the number of times «i» occurs as a
factor"
" of «n». Raises a ValueError exception if any «i» or «r»
equals 5."
},
END_STRUCT_LIST
};
That lack of a comma means you shouldn’t be adding anything after that
last item.
On 10/11/2025 08:14, David Brown wrote:
On 10/11/2025 04:51, Lawrence D’Oliveiro wrote:
On Mon, 10 Nov 2025 01:12:10 +0000, bart wrote:
I also have a small problem with all those trailing commas.
I don’t. I use them to indicate that there’s nothing special about the >>> last item in the list, you can add more after that if you want. This
is usually the case in high-level languages.
Trailing commas also make such tables and lists easier to maintain.
You can cut, copy and paste more easily, and adding new items only
affects the new lines - it does not mean changing existing lines. In
a world of git, svn, and other version control software, it is a
significant advantage if changes to code only affect the lines that
have a meaningful change.
Yeah, I made the same point about semicolons in the one of the A68
threads, and I was just insulted.
However, by trailing commas here, I meant the ones at the end of each
line when lists are laid out one item per line.
I was looking at ways to eliminate those, as semicolons are in many languages, or at least made optional.
Tabulated data in printed material usually doesn't have such punctuation.
In C code, on the other hand, the last item in an array is often a
sentinel to indicate the end of the list, e.g.
static PyMethodDef discipline_methods[] =
{
{"makedict", discipline_makedict, METH_VARARGS,
"makedict(«tuple of pairs», «message»)\n\n" >>> "displays a message and makes a dictionary from a tuple"
" of (key, value) pairs. Raises a ValueError exception if"
" any key or value is ExceptMe."
},
{"factorize", discipline_factorize, METH_VARARGS,
"factorize(«n»)\n\n"
"returns a tuple of integer pairs («i», «r») >>> representing the"
"prime factors of positive integer «n», where «i» is a
prime"
" number and «r» is the number of times «i» occurs as a
factor"
" of «n». Raises a ValueError exception if any «i» or
«r» equals 5."
},
END_STRUCT_LIST
};
That lack of a comma means you shouldn’t be adding anything after that >>> last item.
(Why not? Maybe you do want to add another option. Or you want to remove
or comment that last one. Same issue with semicolons. Make all lines
have the same rank.)
On 10/11/2025 12:00, bart wrote:
However, by trailing commas here, I meant the ones at the end of each
line when lists are laid out one item per line.
That is what is meant by "trailing commas". What else might it mean?
enum colours = {
red,
green,
blue,
purple,
pale_fushia_with_a_hint_of_orange,
};
I was looking at ways to eliminate those, as semicolons are in many
languages, or at least made optional.
How did we get back to semicolons here? You said they were "solved". (I don't know what that means, since I don't know why you think they are a problem in the first place, but that's for a different branch of the thread.) We are talking here about trailing commas in lists.
Tabulated data in printed material usually doesn't have such punctuation.
Tabulated data in printed material is for human consumption.
On 10/11/2025 13:13, David Brown wrote:
On 10/11/2025 12:00, bart wrote:
However, by trailing commas here, I meant the ones at the end of each
line when lists are laid out one item per line.
That is what is meant by "trailing commas". What else might it mean?
enum colours = {
red,
green,
blue,
purple,
pale_fushia_with_a_hint_of_orange,
};
There are 5 commas here on the ends of 5 lines, which is what I meant by trailing comma.
This seemed as needless to me as having 5 semicolons
closing 5 lines, if you are delimiting each item by a newline anyway.
By a 'trailing comma' can also be taken to mean the one on that 5th
line, since the others are needed as separators.
Some languages will
allow that last comma to simplify maintenance, in cases where there can
be an arbitrary number of items.
I was looking at ways to eliminate those, as semicolons are in many
languages, or at least made optional.
How did we get back to semicolons here? You said they were "solved".
(I don't know what that means, since I don't know why you think they
are a problem in the first place, but that's for a different branch of
the thread.) We are talking here about trailing commas in lists.
Tabulated data in printed material usually doesn't have such
punctuation.
Tabulated data in printed material is for human consumption.
I'm also talking about source code for human consumption. Since printing
has a long history of presenting such content, it might be worth
taking some inspiration from it.
On 10/11/2025 17:20, bart wrote:
Yes, that is what a "trailing comma" is in this discussion. No one has been questioning commas between items in lists - the "trailing comma" is
a comma that comes at the end, after the last item.
Some languages will allow that last comma to simplify maintenance, in
cases where there can be an arbitrary number of items.
Exactly.
I am very confused as to what you think "trailing comma" could possibly mean, other than the fifth comma in the example I gave. I can
appreciate that you might not like having it there, while there is no
doubt that some people /do/ like the support. That's a matter of taste
and opinion.
On 10/11/2025 16:33, David Brown wrote:
On 10/11/2025 17:20, bart wrote:
Yes, that is what a "trailing comma" is in this discussion. No one
has been questioning commas between items in lists - the "trailing
comma" is a comma that comes at the end, after the last item.
Some languages will allow that last comma to simplify maintenance, in
cases where there can be an arbitrary number of items.
Exactly.
I am very confused as to what you think "trailing comma" could
possibly mean, other than the fifth comma in the example I gave. I
can appreciate that you might not like having it there, while there is
no doubt that some people /do/ like the support. That's a matter of
taste and opinion.
My comments were about eliminating commas on all the lines, where the
comma is the last thing. For examples like this:
58, 189, 22
101, 199, 32
it'll be about the last comma on the line (the trailing one).
(A CDF data file will look like this; no comma at end-of-line, but those will usually be one record per line too.)
So my preference is:
A
B
...
Z
But as that's not yet possible, I allow this:
A,
B,
...
Z,
This simplifies things as you and others have pointed out. But some languages will require:
A,
B,
...
Z
A complication is that comma-separated items can occur in other contexts where a trailing comma after the last item is not a good idea, even if written one item per line:
F(w, x, y,)
This is ambiguous (is there an omitted 4th argument?). A short argument
list will not often have the list augmented or reduced.
On 10/11/2025 12:00, bart wrote:
On 10/11/2025 08:14, David Brown wrote:
[ Trailing commas ]
I haven't followed all the posts there (since I don't know Algol), so I
can't comment on that.
[...]
That is what is meant by "trailing commas". What else might it mean?
enum colours = {
red,
green,
blue,
purple,
pale_fushia_with_a_hint_of_orange,
};
I was looking at ways to eliminate those, as semicolons are in many
languages, or at least made optional.
How did we get back to semicolons here?
You said they were "solved". (I
don't know what that means, since I don't know why you think they are a problem in the first place, but that's for a different branch of the
thread.) We are talking here about trailing commas in lists.
On 10.11.2025 14:13, David Brown wrote:
(In case of that poster most probably by obsession.)
You said they were "solved". (I
don't know what that means, since I don't know why you think they are a
problem in the first place, but that's for a different branch of the
thread.) We are talking here about trailing commas in lists.
Yes, your case was obvious [to me]; it's the most common case in many programming languages.
Since you mentioned Algol 68 above (and the relation to semicolons)
I'd like to show one feature that illustrates an existing relation.
In some recent post I had mentioned the semicolon as sequencing token
and that in Algol 68 there's also a collateral token, the comma. E.g.
BEGIN
INT n := 0, SEMA consume = LEVEL 0, produce = LEVEL 3;
A trailing comma makes no sense if there's nothing to execute after
the third parallel instance (like here with comma in the collateral
case it's the same with semicolons in the sequenced case).
Algol 68's syntax is very coherent as we can see. It's a conceptual
general principle, and while obvious above, in case of the parallel
executed program parts, it can generally be applied, or also replaced
by sequenced building blocks (comma -> semicolon), or vice versa.
(That's BTW another instance where folks that focus on lexical and
syntax details (not you!)
decisions.)
So what is the significance of using commas here?
On Tue, 11 Nov 2025 15:08:50 +0000, bart wrote:
So what is the significance of using commas here?
Revised Report section 3.3, “Collateral and parallel clauses”:
Collateral-clauses allow an arbitrary merging of streams of
actions. Parallel-clauses provide, moreover, levels of
coordination for the synchronization (10.2.4) of that merging.
So, I have decided cut any ties with that language [Algol68]
FI OD and CASE
TYPE SYNTAX
I will basically keep REF, but will be on the lookout for an
alternative, as that seems too heavy. ^ from Pascal possibly.
So, I have decided cut any ties with that language. [Algol68]
Mine is anyway already vastly different, and still simpler and easier
while having dozens of more practical features.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,089 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 153:54:56 |
| Calls: | 13,921 |
| Calls today: | 2 |
| Files: | 187,021 |
| D/L today: |
3,760 files (944M bytes) |
| Messages: | 2,457,163 |