• Algol 68 - array of procedures aligned at index 0 ?

    From Janis Papanagnou@[email protected] to comp.lang.misc on Sat Nov 1 16:00:46 2025
    From Newsgroup: comp.lang.misc

    Is there a way in Algol 68 that I can create an array indexed [0..1] of procedures to be initialized by an _identity_ declaration as 'p' below?

    PROC g = BOOL : ... ;
    PROC h = BOOL : ... ;

    [] PROC BOOL p =
    CASE n IN
    ( h, g ),
    ( g, h )
    ESAC;

    Like this code but array 'p' with indices 0..1 (instead of 1..2).

    Declaring 'p' with [0:1] isn't possible it seems for the identity case
    where a formal [] declarer seems necessary. While an _assignment_ like

    [0:1] PROC BOOL p := ... ;

    is obviously possible.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Sat Nov 1 20:54:19 2025
    From Newsgroup: comp.lang.misc

    On 01/11/2025 15:00, Janis Papanagnou wrote:
    Is there a way in Algol 68 that I can create an array indexed [0..1] of procedures to be initialized by an _identity_ declaration as 'p' below?
    PROC g = BOOL : ... ;
    PROC h = BOOL : ... ;
    [] PROC BOOL p =
    CASE n IN
    ( h, g ),
    ( g, h )
    ESAC;
    Like this code but array 'p' with indices 0..1 (instead of 1..2).

    The problem is that "(h,g)" is an array indexed starting at 1.
    So you need to re-base the array by using "[@0]". The obvious place to
    put that is immediately after the "ESAC", but A68G complains on the
    perhaps spurious ground that the "[@0]"can only be applied to a row or
    similar. I don't know whether this is also a true A68 limitation or a
    minor A68G bug/divergence. The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".

    Declaring 'p' with [0:1] isn't possible it seems for the identity case
    where a formal [] declarer seems necessary.

    True. In "[] PROC BOOL p = whatever", "p" takes its bounds from
    those of "whatever", so it's "whatever" rather than "p" that has to have
    the bounds you want.

    While an _assignment_ like
    [0:1] PROC BOOL p := ... ;
    is obviously possible.

    It's possible, but you will still have problems unless "..." has
    bounds "0:1". In cases similar to your code above, it might still be best
    to create an object specifically of the correct type/mode, so starting at
    1 by default and then re-basing that.
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Ascher
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sun Nov 2 07:33:56 2025
    From Newsgroup: comp.lang.misc

    On 01.11.2025 21:54, Andy Walker wrote:
    On 01/11/2025 15:00, Janis Papanagnou wrote:
    Is there a way in Algol 68 that I can create an array indexed [0..1] of
    procedures to be initialized by an _identity_ declaration as 'p' below?
    PROC g = BOOL : ... ;
    PROC h = BOOL : ... ;
    [] PROC BOOL p =
    CASE n IN
    ( h, g ),
    ( g, h )
    ESAC;
    Like this code but array 'p' with indices 0..1 (instead of 1..2).

    The problem is that "(h,g)" is an array indexed starting at 1.
    So you need to re-base the array by using "[@0]".

    Yeah. I had tried a couple variants with '[AT 0]', but to no avail.

    The obvious place to put that is immediately after the "ESAC",

    It didn't occur to me to extract these to an outer level here. In my
    tries I've had spread the 'AT's at the array elements directly.

    but A68G complains on the
    perhaps spurious ground that the "[@0]"can only be applied to a row or similar.

    These Genie's errors was that made me finally give up my tries.

    I don't know whether this is also a true A68 limitation or a
    minor A68G bug/divergence.

    Maybe I'll also ask what Marcel thinks; specifically concerning Genie,
    or generally concerning the standard. (Maybe it's an oversight; can't
    tell.)

    The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".

    I had intended to avoid "spurious" declarations, but to keep the later
    code's logic clearer it might be worth to follow that path.


    Declaring 'p' with [0:1] isn't possible it seems for the identity case
    where a formal [] declarer seems necessary.

    True. In "[] PROC BOOL p = whatever", "p" takes its bounds from
    those of "whatever", so it's "whatever" rather than "p" that has to have
    the bounds you want.

    While an _assignment_ like
    [0:1] PROC BOOL p := ... ;
    is obviously possible.

    It's possible, but you will still have problems unless "..." has
    bounds "0:1". In cases similar to your code above, it might still be best
    to create an object specifically of the correct type/mode, so starting at
    1 by default and then re-basing that.

    Thanks.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sun Nov 2 09:50:55 2025
    From Newsgroup: comp.lang.misc

    On 02.11.2025 07:33, Janis Papanagnou wrote:
    On 01.11.2025 21:54, Andy Walker wrote:
    [...]
    I don't know whether this is also a true A68 limitation or a
    minor A68G bug/divergence.

    Maybe I'll also ask what Marcel thinks; specifically concerning Genie,
    or generally concerning the standard. (Maybe it's an oversight; can't
    tell.)

    I've sent an email; we'll see.

    The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".

    This is what I'm now doing. It's clear enough, only little overhead.

    [...] In cases similar to your code above, it might still be best
    to create an object specifically of the correct type/mode, so starting at
    1 by default and then re-basing that.

    (Trying a MODE declaration for a [0:1] array didn't solve the issue.
    And the '(g, h)' initializer expression I couldn't force to [0:1].)

    Meanwhile I'll go with your "p = pp[@0]" suggestion above. Thanks.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Sun Nov 2 11:10:38 2025
    From Newsgroup: comp.lang.misc

    On 02/11/2025 06:33, Janis Papanagnou wrote:
    On 01.11.2025 21:54, I wrote:
    The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".
    I had intended to avoid "spurious" declarations, but to keep the later
    code's logic clearer it might be worth to follow that path.

    A slightly different approach would use a cast:

    [] PROC BOOL p = [] PROC BOOL CASE ... ESAC [@0];

    That avoids the extra declaration, but I'm unconvinced that it's as clear
    -- good luck trying to explain how that all works to a class of students!
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Rubinstein
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Sun Nov 2 11:44:47 2025
    From Newsgroup: comp.lang.misc

    On 02/11/2025 11:10, Andy Walker wrote:
    On 02/11/2025 06:33, Janis Papanagnou wrote:
    On 01.11.2025 21:54, I wrote:
    The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".
    I had intended to avoid "spurious" declarations, but to keep the later
    code's logic clearer it might be worth to follow that path.

        A slightly different approach would use a cast:

      [] PROC BOOL p = [] PROC BOOL CASE ... ESAC [@0];

    That avoids the extra declaration, but I'm unconvinced that it's as clear
    -- good luck trying to explain how that all works to a class of students!



    Is this a general problem when using a (...) constructor, in that the
    natural bounds start from 1?

    I couldn't get this to work:

    [0:3]INT a := (10, 20, 30);

    It prefers empty bounds, but those default to 1:. Using [0:] didn't
    work. Trying that [@0] didn't work either, for example:

    [0:3]INT a;
    a := (10, 20, 30) [@0];

    It seems a weak spot in the language.

    (In my languages which borrowed the syntax, I use:

    [0:]int a := (10, 20, 30) # static typing
    a := (0: 10, 20, 30) # dynamic typing

    Arrays in static code are often unbounded, but can still have any LWB. A constructor like (10, 20, 30) adapts itself to the requirements; it can initialise a struct for example.)


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sun Nov 2 13:12:44 2025
    From Newsgroup: comp.lang.misc

    On 02.11.2025 12:44, bart wrote:
    On 02/11/2025 11:10, Andy Walker wrote:
    On 02/11/2025 06:33, Janis Papanagnou wrote:
    On 01.11.2025 21:54, I wrote:
    The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".
    I had intended to avoid "spurious" declarations, but to keep the later
    code's logic clearer it might be worth to follow that path.

    A slightly different approach would use a cast:

    [] PROC BOOL p = [] PROC BOOL CASE ... ESAC [@0];

    That avoids the extra declaration, but I'm unconvinced that it's as clear
    -- good luck trying to explain how that all works to a class of students!



    Is this a general problem when using a (...) constructor, in that the
    natural bounds start from 1?

    I couldn't get this to work:

    [0:3]INT a := (10, 20, 30);

    Actually, your result is a variant of the problem I described in my
    post.

    It prefers empty bounds, but those default to 1:. Using [0:] didn't
    work. Trying that [@0] didn't work either, for example:

    [0:3]INT a;
    a := (10, 20, 30) [@0];

    It seems a weak spot in the language.

    To me - and I understood Andy that way as well - it's not clear whether
    it's a restriction in Genie or Algol 68.

    Andy presented a workaround; in case of your example something like

    [4] INT a := ( 10, 20, 30, 40 );
    [0:3] INT b := a [AT 0];


    Janis

    [...]

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sun Nov 2 13:23:44 2025
    From Newsgroup: comp.lang.misc

    On 02.11.2025 13:12, Janis Papanagnou wrote:
    On 02.11.2025 12:44, bart wrote:
    On 02/11/2025 11:10, Andy Walker wrote:
    On 02/11/2025 06:33, Janis Papanagnou wrote:
    On 01.11.2025 21:54, I wrote:
    The simplest workaround seems to be to
    declare "pp" in the way you've declared "p", and then declare
    "[] PROC BOOL p = pp[@0];".
    I had intended to avoid "spurious" declarations, but to keep the later >>>> code's logic clearer it might be worth to follow that path.

    A slightly different approach would use a cast:

    [] PROC BOOL p = [] PROC BOOL CASE ... ESAC [@0];

    That avoids the extra declaration, but I'm unconvinced that it's as clear >>> -- good luck trying to explain how that all works to a class of students! >>>


    Is this a general problem when using a (...) constructor, in that the
    natural bounds start from 1?

    I couldn't get this to work:

    [0:3]INT a := (10, 20, 30);

    Actually, your result is a variant of the problem I described in my
    post.

    It prefers empty bounds, but those default to 1:. Using [0:] didn't
    work. Trying that [@0] didn't work either, for example:

    [0:3]INT a;
    a := (10, 20, 30) [@0];

    It seems a weak spot in the language.

    To me - and I understood Andy that way as well - it's not clear whether
    it's a restriction in Genie or Algol 68.

    Andy presented a workaround; in case of your example something like

    [4] INT a := ( 10, 20, 30, 40 );
    [0:3] INT b := a [AT 0];

    And this obviously works as well (tested with Genie):

    [0:3] INT c := [] INT ( 10, 20, 30, 40 )[AT 0];


    Janis

    [...]


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Mon Nov 3 00:42:22 2025
    From Newsgroup: comp.lang.misc

    On 02/11/2025 11:44, bart wrote:
    I couldn't get this to work:
      [0:3]INT a := (10, 20, 30);

    Well, no. You are trying to assign a row of three integers to a
    row of four integer variables with a different lower bound.

    It prefers empty bounds, but those default to 1:. Using [0:] didn't
    work. Trying that [@0] didn't work either, for example:
       [0:3]INT a;
       a := (10, 20, 30) [@0];

    You still have the 3 vs 4 problem, but you've also run into an
    obscure part of A68 syntax. "(10, 20, 30)" could be a row of integers.
    It could also be a structure with three fields [not necessarily integers,
    as "10" [eg] could be widened to a real or a complex]. In more general
    cases [such as Janis's original example] there are many more things that
    that RHS could, in principle, be. Without the "[@0]", the row display is commonly in a strong syntactic position, meaning that the compiler knows exactly what type of object it is required to be and can, if necessary,
    apply a number of coercions to convert its mode as necessary. With the
    "[@0]", the row is in a position where the available coercions are more
    limited [the construct has become a "slice"]. That's why the two
    "workarounds" that Janis has given you work; in one case he supplies an explicit array to be sliced, and in the other he uses a cast to put the
    row back into a strong position.

    It seems a weak spot in the language.

    Sadly, it's now too late to ask Charles Lindsey why it was
    done that way. I did once ask him, but I've forgotten what the answer
    was; sorry! There /was/ a reason!
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Rubinstein
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Mon Nov 3 15:03:20 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 00:42, Andy Walker wrote:
    On 02/11/2025 11:44, bart wrote:
    I couldn't get this to work:
       [0:3]INT a := (10, 20, 30);

        Well, no.  You are trying to assign a row of three integers to a row of four integer variables with a different lower bound.

    That was my mistake. I'd forgotten that in Algol 68, The '3' in '[0:3]'
    is the upper bound not the length.

    (In my verson of the syntax, it is either [lwb..upb], or [lwb:length],
    with the length being optional for unbounded arrays, or where it is set
    by the initialisation data.)

    But if I adjust it to [0:2] to match the (10, 20, 30), then the
    underlying problem is still there.

    It prefers empty bounds, but those default to 1:. Using [0:] didn't
    work. Trying that [@0] didn't work either, for example:
        [0:3]INT a;
        a := (10, 20, 30) [@0];

        You still have the 3 vs 4 problem, but you've also run into an obscure part of A68 syntax.  "(10, 20, 30)" could be a row of integers.
    It could also be a structure with three fields [not necessarily integers,
    as "10" [eg] could be widened to a real or a complex].  In more general cases [such as Janis's original example] there are many more things that
    that RHS could, in principle, be.  Without the "[@0]", the row display is commonly in a strong syntactic position, meaning that the compiler knows exactly what type of object it is required to be and can, if necessary,
    apply a number of coercions to convert its mode as necessary.  With the "[@0]", the row is in a position where the available coercions are more limited [the construct has become a "slice"].  That's why the two "workarounds" that Janis has given you work;  in one case he supplies an explicit array to be sliced, and in the other he uses a cast to put the
    row back into a strong position.

    I was trying another experiment: a 1-element initialiser, but on the way there, came across this:

    []INT a := (10, 20);

    It says 'Actual bounds expected'. So it can't work it out for itself?

    That's very poor; I may have 283 items, do I have to count them all (or
    making closer and closer guesses via trial and error)? Then do the same
    when they change.

    Sticking [@1] at the end didn't help.

    What's coming across is that they spent an awful lot of time preparing a beautifully consistent Revised Report, but not enough running actual,
    real-lfe programs!

    (The 1-element initialiser seems OK, with suitable bounds. The possible problem being that while (10, 20) is clearly some sort of row, (10)
    cannot be distinguished from an ordinary parenthesised scalar value. In
    my language, I need to write it as (10,).

    In Algol68, either '[1]INT a := (10)' or '[1]INT a := 10' work, but that
    [1] is niggling.)


    It seems a weak spot in the language.

        Sadly, it's now too late to ask Charles Lindsey why it was
    done that way.  I did once ask him, but I've forgotten what the answer was;  sorry!  There /was/ a reason!


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Mon Nov 3 16:40:15 2025
    From Newsgroup: comp.lang.misc

    On 03.11.2025 16:03, bart wrote:
    On 03/11/2025 00:42, Andy Walker wrote:
    On 02/11/2025 11:44, bart wrote:
    I couldn't get this to work:
    [0:3]INT a := (10, 20, 30);

    Well, no. You are trying to assign a row of three integers to a
    row of four integer variables with a different lower bound.

    That was my mistake. I'd forgotten that in Algol 68, The '3' in '[0:3]'
    is the upper bound not the length.

    (In my verson of the syntax, it is either [lwb..upb], or [lwb:length],
    with the length being optional for unbounded arrays, or where it is set
    by the initialisation data.)

    But if I adjust it to [0:2] to match the (10, 20, 30), then the
    underlying problem is still there.

    You either don't read the answers given, or don't try to understand
    them! - It's always the same with you, in comp.lang.c and in now in comp.land.misc as well.

    All you're doing is trying to advertise your generally quite useless home-brewed languages. (For that I suggest to open a new thread, so
    that we can easily detect and skip it.)


    It prefers empty bounds, but those default to 1:. Using [0:] didn't
    work. Trying that [@0] didn't work either, for example:
    [0:3]INT a;
    a := (10, 20, 30) [@0];

    You still have the 3 vs 4 problem, but you've also run into an
    obscure part of A68 syntax. "(10, 20, 30)" could be a row of integers.
    It could also be a structure with three fields [not necessarily integers,
    as "10" [eg] could be widened to a real or a complex]. In more general
    cases [such as Janis's original example] there are many more things that
    that RHS could, in principle, be. Without the "[@0]", the row display is
    commonly in a strong syntactic position, meaning that the compiler knows
    exactly what type of object it is required to be and can, if necessary,
    apply a number of coercions to convert its mode as necessary. With the
    "[@0]", the row is in a position where the available coercions are more
    limited [the construct has become a "slice"]. That's why the two
    "workarounds" that Janis has given you work; in one case he supplies an
    explicit array to be sliced, and in the other he uses a cast to put the
    row back into a strong position.

    I was trying another experiment: a 1-element initialiser, but on the way there, came across this:

    []INT a := (10, 20);

    It says 'Actual bounds expected'. So it can't work it out for itself?

    If you're intending to assign values to variables you define them

    [2] INT a := (10, 20);

    or if you have an identity relation (a "constant") you may write

    [] INT b = (10, 20);

    In your original example: [0:3] INT a := (10, 20, 30);
    Shall the compiler assume you forgot the fourth value, or shall it
    assume that you failed to count to four with the index definition,
    if you'd had written [] INT a := (10, 20, 30);
    Either way, you'd complain; because it's not like "your languages"
    work.


    That's very poor; I may have 283 items, do I have to count them all (or

    If you are enumerating an initializer list of 283(!) elements but
    pretend to be too lazy to tell how many there are you are indeed
    (as we know you) just complaining for the sake of it.

    (But you can also just use FLEX arrays; see below.)

    making closer and closer guesses via trial and error)?

    That's how a decades long programmer like you approaches the task?
    This is really stupid!

    Then do the same when they change.

    You cannot change the length of an array of fixed size. Use FLEX
    array types for that.

    FLEX [0:-1] INT d := (1, 2, 3);
    d := (1, 2, 3, 4);
    d := (2, 3);


    Sticking [@1] at the end didn't help.

    Starting indexing at 1 is anyway the default, so there's not much
    point doing that with your examples here.

    If you'd _really_ be interested about Algol 68 you should read a
    textbook. Genie provides a fine manual for free. (You know that!)


    What's coming across is that they spent an awful lot of time preparing a beautifully consistent Revised Report, but not enough running actual, real-lfe programs!

    You've in comp.lang.c proven countless times that you have no idea
    what real "real-life programs" are.

    And now you're also infesting comp.lang.misc with your tons of
    complaints-posts in band-worm threads and self-advertisement for
    "your languages"... *sigh* - Please don't continue that here!

    Janis

    [...]


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Mon Nov 3 17:00:20 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 15:40, Janis Papanagnou wrote:
    On 03.11.2025 16:03, bart wrote:


    You either don't read the answers given, or don't try to understand
    them!

    I'm saying the errors I was getting were not due to the mismatch of lengths.

    Starting indexing at 1 is anyway the default, so there's not much
    point doing that with your examples here.

    The point, according to AW, was to narrow the meaning of a (...)
    construct to an array slice.

    You've in comp.lang.c proven countless times that you have no idea
    what real "real-life programs" are.

    I've sold about $10m of software written in my languages. How much more
    real do I have to get?


    And now you're also infesting comp.lang.misc with your tons of complaints-posts in band-worm threads and self-advertisement for
    "your languages"... *sigh* - Please don't continue that here!

    This forum is not specific to any particular language, all are welcome, including discussions of homebrew languages or new features for any.

    In this thread, I find it interesting to compare features across
    languages, to see what works well and what doesn't.

    Clearly, you don't care for language design at all.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Mon Nov 3 17:32:48 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 15:40, Janis Papanagnou wrote:
    On 03.11.2025 16:03, bart wrote:

    []INT a := (10, 20);

    It says 'Actual bounds expected'. So it can't work it out for itself?

    If you're intending to assign values to variables you define them

    [2] INT a := (10, 20);

    or if you have an identity relation (a "constant") you may write

    [] INT b = (10, 20);

    OK, that takes care of most use-cases where you have initialiser values.

    But why doesn't it work with ":="?


    Either way, you'd complain; because it's not like "your languages"
    work.

    Or like C:

    const int a[] = {10, 20, ...};
    int b[] = {10, 20, ...};

    Neither of these require you to count the elements.




    That's very poor; I may have 283 items, do I have to count them all (or

    If you are enumerating an initializer list of 283(!) elements but
    pretend to be too lazy to tell how many there

    The '283' represents some unknown number of initialiser values. The
    compiler will know how many there are; there's no need for you to have
    to as well!

    (In the case of C, you can optionally give the count, but it is legal to over-specify, then any missing values are filled with zeros. That may or
    may not be what you intend.)

    If you'd _really_ be interested about Algol 68 you should read a
    textbook.

    I was really interested at one time, and I learnt about it from a book.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Mon Nov 3 20:28:48 2025
    From Newsgroup: comp.lang.misc

    On 03.11.2025 18:32, bart wrote:
    On 03/11/2025 15:40, Janis Papanagnou wrote:
    On 03.11.2025 16:03, bart wrote:

    []INT a := (10, 20);

    It says 'Actual bounds expected'. So it can't work it out for itself?

    If you're intending to assign values to variables you define them

    [2] INT a := (10, 20);

    or if you have an identity relation (a "constant") you may write

    [] INT b = (10, 20);

    OK, that takes care of most use-cases where you have initialiser values.

    But why doesn't it work with ":="?

    Because you are actually comprising two separate instances here;
    an object declaration (an array of size 2) and an assignment of
    an array of size 2 with literal values to an array variable of
    size 2

    [2] INT a;
    a := (10, 20);

    The (non-FLEX) Algol 68 arrays have a _constant_ size!

    Of course you could introduce _special case_ rules and let the
    language handle this combination specially - like "C" handles a
    lot of things "specially". YMMV, but I prefer a consistent model!


    Either way, you'd complain; because it's not like "your languages"
    work.

    Or like C:

    const int a[] = {10, 20, ...};
    int b[] = {10, 20, ...};

    Neither of these require you to count the elements.

    "C" is so rotten inconsistent and kludgy a language, and - you
    know that! - especially concerning "C" arrays, that its hardly a
    sensible competitor for clear language design.

    That's very poor; I may have 283 items, do I have to count them all (or

    If you are enumerating an initializer list of 283(!) elements but
    pretend to be too lazy to tell how many there

    The '283' represents some unknown number of initialiser values.

    Nonsense; if you have an initializer the number isn't unknown.

    The
    compiler will know how many there are; there's no need for you to have
    to as well!

    Or you have a language with clear design (see above) and use for
    flexible arrays - as you've been explained in the previous post,
    and as you've snipped the contents here in this post - a FLEX []
    in Algol 68 which size is automatically adjusted to the size of
    the RHS array

    FLEX [0:-1] INT a := ( 1, 2, 3, 4, ...
    ...
    ...
    ...
    281, 282, 283 );

    And if you're using _identity_ declarations you also don't need
    the ranges as we also already told you. Identity declarations of
    course are _coupled_

    [] INT e = (3, 4);

    and for obvious reasons *cannot* be separated in

    [] INT e;
    e = (3, 4);

    Any comparison with "C" makes anyway no sense here; "C" doesn't
    have such identity declarations. (Early versions use CPP macros
    for "constants" and later 'const' is also something different.)

    [...]

    If you'd _really_ be interested about Algol 68 you should read a
    textbook.

    I was really interested at one time, and I learnt about it from a book.

    Then I wonder about your problems knowing or understanding what
    was even explicitly explained to you in the posts of the thread.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Mon Nov 3 21:02:58 2025
    From Newsgroup: comp.lang.misc

    On 03.11.2025 18:00, bart wrote:

    Clearly, you don't care for language design at all.

    Au contraire!

    You are missing so many things - even if explicitly and multiply
    having been pointed to! - that I'm not astonished that you missed
    that too!

    You've regularly shown that you're so focused on [less important]
    details that you're regularly missing the big picture! - This could
    be seen for software projects, components, design, environments,
    standards, methods, and much more...

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Mon Nov 3 20:10:12 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 19:28, Janis Papanagnou wrote:
    On 03.11.2025 18:32, bart wrote:


    The '283' represents some unknown number of initialiser values.

    Nonsense; if you have an initializer the number isn't unknown.

    It will be known to the compiler after parsing; it might not be known to
    you!

    By coincidence, here is some init data I had to generate today:

    0x55, 0x48, 0x8B, 0xEC, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x89, 0x4D,
    0x10,
    0x48, 0x89, 0x55, 0x18, 0x4C, 0x89, 0x45, 0x20, 0x4C, 0x89, 0x4D,
    0x28,
    0x33, 0xC0, 0x48, 0x89, 0x45, 0xF0, 0x8B, 0x45, 0x20, 0x83, 0xE0,
    0x01,
    0x48, 0x85, 0xC0, 0x74, 0x0B, 0xB8, 0x08, 0x00, 0x00, 0x00, 0x48,
    0x89,
    0x45, 0xF0, 0x6A, 0x00, 0x48, 0x8B, 0x45, 0x20, 0x48, 0xC1, 0xE0,
    0x03,
    0x48, 0x01, 0x45, 0xF0, 0x48, 0x8B, 0x45, 0x20, 0x48, 0x89, 0x45,
    0xE8,
    0x48, 0x8B, 0x45, 0xE8, 0x48, 0x83, 0xF8, 0x01, 0x0F, 0x8C, 0x25,
    0x00,
    0x00, 0x00, 0x48, 0x8B, 0x45, 0x18, 0x4C, 0x8B, 0x55, 0xE8, 0x4A,
    0x8B,
    0x44, 0xD0, 0xF8, 0x48, 0x89, 0x45, 0xF8, 0xFF, 0x75, 0xF8, 0x48,
    0x8B,
    0x45, 0xE8, 0x48, 0xFF, 0xC8, 0x48, 0x89, 0x45, 0xE8, 0x48, 0x83,
    0xF8,
    0x01, 0x7D, 0xDB, 0x48, 0x8B, 0x0C, 0x24, 0xF3, 0x0F, 0x7E, 0x04,
    0x24,
    0x48, 0x8B, 0x54, 0x24, 0x08, 0xF3, 0x0F, 0x7E, 0x4C, 0x24, 0x08,
    0x4C,
    0x8B, 0x44, 0x24, 0x10, 0xF3, 0x0F, 0x7E, 0x54, 0x24, 0x10, 0x4C,
    0x8B,
    0x4C, 0x24, 0x18, 0xF3, 0x0F, 0x7E, 0x5C, 0x24, 0x18, 0x48, 0x8B,
    0x45,
    0x10, 0x48, 0xFF, 0xD0, 0x48, 0x03, 0x65, 0xF0, 0x44, 0x8A, 0x55,
    0x28,
    0x45, 0x22, 0xD2, 0x74, 0x05, 0x66, 0x48, 0x0F, 0x7E, 0xC0, 0x48,
    0x89,
    0x45, 0xF8, 0x48, 0x8B, 0x45, 0xF8, 0x48, 0x83, 0xC4, 0x20, 0x5D, 0xC3

    (I hope, that when posted, it doesn't wrap.)

    This is meant to be incorporated into some program source code. To avoid annoying you, let's pretend that's C, then I'd need to book-end it like
    this:

    char data[] = {
    <block of text from above>
    };

    Now, you're saying I ought to know what goes inside '[]'. Well, not
    really. Perhaps the program generating that data could print that value.
    Or I could count columns and rows and work it out. But I don't really
    want to have to hardcode that value inside [].

    Maybe I will regenerate that data (perhaps it will be included from some
    file that I don't even look at) then I'd have to update the number.

    It just shouldn't be necessary.

    The largest set of data I've included this way I think was 100M numbers.
    That was testing embedding. But I have included actual binary data (eg.
    images and executables) like this too.


    I was really interested at one time, and I learnt about it from a book.

    Then I wonder about your problems knowing or understanding what
    was even explicitly explained to you in the posts of the thread.

    It was about 45 years ago, and I never managed to try it out for real
    until A68G came about.

    Those decades of real-life experience (whatever your opinions about
    that), opened my eyes more to its practicial deficiencies. It's clearly
    a language that belongs more in academia.


    (If curious about what those bytes mean, it is the machine code of a
    function to solve the LIBFFI problem for Win64 ABI, that normally
    requires a complex external library to be built from source.

    Although not meant to be used from C, I tried it just now, and it works.

    This is something not possible in standard C, yet C gives me the ability
    to incorporate that binary code, and pass it control. This is what more practical languages allow you to do.)

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Mon Nov 3 20:34:38 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 20:02, Janis Papanagnou wrote:
    On 03.11.2025 18:00, bart wrote:

    Clearly, you don't care for language design at all.

    Au contraire!

    You are missing so many things - even if explicitly and multiply
    having been pointed to! - that I'm not astonished that you missed
    that too!

    You've regularly shown that you're so focused on [less important]
    details that you're regularly missing the big picture! - This could
    be seen for software projects, components, design, environments,
    standards, methods, and much more...

    Janis


    Let's see, I've devised:

    * Systems languages
    * Scripting languages
    * Intermediate languages
    * Assembly languages (that is, the syntax used, as the instr set
    is fixed by the target)
    * Object file formats
    * Executable and dynamic library formats

    And I've implemented:

    * Editors
    * IDEs
    * Assemblers
    * Compilers
    * Linkers
    * Interpreters
    * All the libraries I needed (in the 1980s, that covered everything!)

    I've also dealt with everything microcontrollers to mainframes at some
    point, including machines, and display hardware, that I have made with discrete chips and a soldering iron.

    All of that was achieved with 100% using my own HLLs, and mostly using
    my own assemblers (sometimes I used other assemblers).

    You have to ensure that the languages you are devising can not only cope
    with enabling all those projects, but also can be put to use for actual applications. There is also the question of bootstrapping when all your languages are self-hosted.

    So, you're saying this is just concentrating on the details? I'd be
    interested in what the big picture is then.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Mon Nov 3 22:31:58 2025
    From Newsgroup: comp.lang.misc

    On 03.11.2025 21:10, bart wrote:
    On 03/11/2025 19:28, Janis Papanagnou wrote:
    On 03.11.2025 18:32, bart wrote:


    The '283' represents some unknown number of initialiser values.

    Nonsense; if you have an initializer the number isn't unknown.

    It will be known to the compiler after parsing; it might not be known to
    you!

    But it is known; you see the numbers below! - You can count them, you
    can use a simple "processor" to count them, or (as suggested) you can
    in Algol 68 use a data structure that is "flexible" (for example).


    By coincidence, here is some init data I had to generate today:

    0x55, 0x48, 0x8B, 0xEC, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x89, 0x4D, 0x10,
    0x48, 0x89, 0x55, 0x18, 0x4C, 0x89, 0x45, 0x20, 0x4C, 0x89, 0x4D, 0x28,
    0x33, 0xC0, 0x48, 0x89, 0x45, 0xF0, 0x8B, 0x45, 0x20, 0x83, 0xE0, 0x01,
    0x48, 0x85, 0xC0, 0x74, 0x0B, 0xB8, 0x08, 0x00, 0x00, 0x00, 0x48, 0x89,
    0x45, 0xF0, 0x6A, 0x00, 0x48, 0x8B, 0x45, 0x20, 0x48, 0xC1, 0xE0, 0x03,
    0x48, 0x01, 0x45, 0xF0, 0x48, 0x8B, 0x45, 0x20, 0x48, 0x89, 0x45, 0xE8,
    0x48, 0x8B, 0x45, 0xE8, 0x48, 0x83, 0xF8, 0x01, 0x0F, 0x8C, 0x25, 0x00,
    0x00, 0x00, 0x48, 0x8B, 0x45, 0x18, 0x4C, 0x8B, 0x55, 0xE8, 0x4A, 0x8B,
    0x44, 0xD0, 0xF8, 0x48, 0x89, 0x45, 0xF8, 0xFF, 0x75, 0xF8, 0x48, 0x8B,
    0x45, 0xE8, 0x48, 0xFF, 0xC8, 0x48, 0x89, 0x45, 0xE8, 0x48, 0x83, 0xF8,
    0x01, 0x7D, 0xDB, 0x48, 0x8B, 0x0C, 0x24, 0xF3, 0x0F, 0x7E, 0x04, 0x24,
    0x48, 0x8B, 0x54, 0x24, 0x08, 0xF3, 0x0F, 0x7E, 0x4C, 0x24, 0x08, 0x4C,
    0x8B, 0x44, 0x24, 0x10, 0xF3, 0x0F, 0x7E, 0x54, 0x24, 0x10, 0x4C, 0x8B,
    0x4C, 0x24, 0x18, 0xF3, 0x0F, 0x7E, 0x5C, 0x24, 0x18, 0x48, 0x8B, 0x45,
    0x10, 0x48, 0xFF, 0xD0, 0x48, 0x03, 0x65, 0xF0, 0x44, 0x8A, 0x55, 0x28,
    0x45, 0x22, 0xD2, 0x74, 0x05, 0x66, 0x48, 0x0F, 0x7E, 0xC0, 0x48, 0x89,
    0x45, 0xF8, 0x48, 0x8B, 0x45, 0xF8, 0x48, 0x83, 0xC4, 0x20, 0x5D, 0xC3

    (I hope, that when posted, it doesn't wrap.)

    (It's fine.)


    This is meant to be incorporated into some program source code. To avoid annoying you, let's pretend that's C, then I'd need to book-end it like
    this:

    char data[] = {
    <block of text from above>
    };

    Now, you're saying I ought to know what goes inside '[]'.

    Well, yes. It's obviously 12 columns and 17 rows, as can quickly be
    seen. - Of course I would expect that you know what sort of data the
    program will generate, but if not, 12*17 = 170+34 = 204. If you have difficulties with simplest math - I think we've learned such things
    when being 8 or 9 years old - and if you need more than five seconds
    for that just pick from the simple language feature suggestions above
    instead.

    Well, not
    really. Perhaps the program generating that data could print that value.
    Or I could count columns and rows and work it out. But I don't really
    want to have to hardcode that value inside [].

    Use an identity relation, use flexible arrays; there's many options
    (if you don't want to count; which isn't necessary as explained).

    (You can also use "your languages" if you feel more comfortable. I
    really don't care.)


    Maybe I will regenerate that data (perhaps it will be included from some
    file that I don't even look at) then I'd have to update the number.

    The question is; is that a fixed entity or a variable entity? - In
    the former case you'd use (in Algol 68) an identity relation, and
    in the latter case - if it needs to carry over time array elements
    of varying number - use a FLEX array; that's what they are for.
    (For both variants you need no specific bounds.)


    It just shouldn't be necessary.

    And it isn't. (As explained and shown a couple times meanwhile.)


    The largest set of data I've included this way I think was 100M numbers.
    That was testing embedding. But I have included actual binary data (eg. images and executables) like this too.

    I think hard-coding 10^8 numbers is not the wisest implementation,
    to say the least, but without knowing the details I won't discuss
    that; so let's just accept that the math (counting) is impractical
    and one of the other two options will be applied to store the data
    in-memory when using Algol 68.

    But would you really inline such amounts of data? - Or did you mean
    to read them in from external media? - But then you cannot use the
    initializer lists. - Whatever might apply for you, it doesn't seem
    to be a clever approach.

    BTW, as said, I most probably wouldn't store these amounts of data
    in-memory, but I'd also have some doubts whether a language like
    Algol 68, and specifically the Genie interpreter could handle that
    amount of data in the first place; after all the "Genie" appears
    to me to not have been trimmed to a low data space-consumption.
    And a quick test confirms that: "a68g: abend: not enough memory."
    So you'd have to use more intelligent solutions to process huge
    amounts of data with Genie. Or switch to other languages; I'm sure
    "C" does not have that issue since you're there operating on the
    lowest level.)


    I was really interested at one time, and I learnt about it from a book.

    Then I wonder about your problems knowing or understanding what
    was even explicitly explained to you in the posts of the thread.

    It was about 45 years ago, and I never managed to try it out for real
    until A68G came about.

    That's not much different from myself; I had read my first (and back
    then only) Algol 68 book 40+ years ago, then I paused these decades
    completely, and just recently started again using it. - The fine thing
    is that Algol 68 is so consistent a language that it was easy to get
    into it again. - A pity that it wasn't like that with your knowledge.
    But anyway; we've already pointed out a couple things you ought to
    know; nonetheless you're after the third post still ignoring them.


    Those decades of real-life experience (whatever your opinions about
    that), opened my eyes more to its practicial deficiencies.

    Which ones? (Compared to the languages existing back then?)

    It's clearly a language that belongs more in academia.

    That's actually an additional "pro", that it's also usable as language
    to teach and learn!

    Janis

    [...]


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Mon Nov 3 22:35:43 2025
    From Newsgroup: comp.lang.misc

    On 03.11.2025 21:34, bart wrote:
    On 03/11/2025 20:02, Janis Papanagnou wrote:
    On 03.11.2025 18:00, bart wrote:

    Clearly, you don't care for language design at all.

    Au contraire!

    You are missing so many things - even if explicitly and multiply
    having been pointed to! - that I'm not astonished that you missed
    that too!

    You've regularly shown that you're so focused on [less important]
    details that you're regularly missing the big picture! - This could
    be seen for software projects, components, design, environments,
    standards, methods, and much more...

    [...]

    So, you're saying this is just concentrating on the details? I'd be interested in what the big picture is then.

    I've named some above and you've documented that all in hundreds of
    your posts in comp.lang.c and can read that in the responses.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Mon Nov 3 23:37:43 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 21:35, Janis Papanagnou wrote:
    On 03.11.2025 21:34, bart wrote:
    On 03/11/2025 20:02, Janis Papanagnou wrote:
    On 03.11.2025 18:00, bart wrote:

    Clearly, you don't care for language design at all.

    Au contraire!

    You are missing so many things - even if explicitly and multiply
    having been pointed to! - that I'm not astonished that you missed
    that too!

    You've regularly shown that you're so focused on [less important]
    details that you're regularly missing the big picture! - This could
    be seen for software projects, components, design, environments,
    standards, methods, and much more...

    [...]

    So, you're saying this is just concentrating on the details? I'd be
    interested in what the big picture is then.

    I've named some above and you've documented that all in hundreds of
    your posts in comp.lang.c and can read that in the responses.

    You've listed some things that could mean anything:

    * Components (of what)
    * Design ... (again, of what)
    * Environments ...
    * Standards ...
    * Methods ...

    They are very vague. OK, let *me* add a few more concrete ones:

    * Technical documentation
    * User documentation
    * Customer support
    * Help services within the app
    * Software protection (stopping illegal copies)
    * Packaging
    * Installation
    * Configuration
    * Distribution
    * Updates
    * Autosave of data
    * Internationalisation and dealing with translations
    * Drivers for video, input devices, printers, plotters (pre-Windows)
    * Exporting to multiple file formats
    * Importing from various file formats
    * Allowing users to create their own add-ons to your apps
    * Migrating to different CPU generations

    These can be either side of the line between language and application,
    or can straddle it. Since I was doing all the work anyway, it didn't
    make much difference to me. (If there was a bug reported, it could have
    been in a script, main app source code, or within the compile or
    interpreter.)

    So, what am I missing? Enlighten me; give me an example of how you
    grappled with 'Standards', say.

    Or are these supposed to be examples of what's involved in designing a
    big, 1000-man-year language like C++. So what sorts of things would the
    people involved discuss on a low-traffic informal discussion group with strangers?

    It's clearly got to be something stratospherically higher than mere
    squabbles about syntax or what-not.

    But some of the most popular threads on Reddit subs about PL design are actually about such bike-shedding.

    As you may have gathered, my language efforts have been exclusively
    in-house, while the scriting languages I made available to enable
    third-party add-ons, could be considered DSLs.

    They were never intended to be huge mainstream languages.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Tue Nov 4 00:35:12 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 20:10, bart wrote:
    [...]> Maybe I will regenerate that data (perhaps it will be included from some
    file that I don't even look at) then I'd have to update the number.
    It just shouldn't be necessary.

    It isn't [in A68]. Use an identity declaration. Or a flexible array, as Janis suggested.
    Those decades of real-life experience (whatever your opinions about that), opened my eyes more to its practicial deficiencies.

    (a) A68 is a language that is over 50 years old. It belongs to the
    era of mainframes, with jobs fed to them by physically taking decks of cards
    to a computing centre. The miracle is that it is still usable in the modern environment. (b) What you call "deficiencies" are almost always simply cases that your private languages do differently. But languages are not properly defined by merely giving examples; you also need to give the syntax, in sufficient detail that readers can determine whether their own code conforms
    to that syntax. Likewise the semantics. What is /your/ proposed syntax for variable declarations? Then we can compare that with what A68 does, and see what the trade-offs are. [I do not -- /definitely/ not! -- claim that A68 is perfect, but most of your objections are merely your preferences, with little regard for the bigger picture.]

    It's clearly a language that belongs more in academia.

    Yet the first implementations were from RRE [defence establishment!] and it was, to my personal knowledge, used in engineering, natural language translation, data processing, accountancy, train routing, forestry, and many other areas of [1970s] computing, as well as many aspects of CS and maths.
    I don't know what causes you to think it an "academic" language -- /apart/
    from the unfortunate fact that the first few textbooks on A68 were very bad, and impractical for proper teaching. [Both Pascal and C fared much better in this regard.]
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Nevin
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@[email protected] to comp.lang.misc on Tue Nov 4 01:05:34 2025
    From Newsgroup: comp.lang.misc

    On Mon, 3 Nov 2025 20:10:12 +0000, bart wrote:

    By coincidence, here is some init data I had to generate today:

    [long array of hex machine-code numbers omitted]

    If you look at Free Software licences, they have a definition for what “source code” means: it is “the preferred form” for doing development with.

    Regardless of whether your project is “Free Software” or not, I’m assuming
    that your project tree includes the source program (and necessary build scripts) for generating that long list of random-looking numbers that
    nobody in their right mind would want to look at. Otherwise, it’s going to be very hard for your employer to find somebody else to maintain your code
    if you should happen to get hit by a bus ...

    In which case, why are those numbers being included in your source? I
    would generate them from the *real* source (the one that a human would
    want to look at) as an automatic part of the build process. That way, any
    bugs found in that code could be fixed in just one place, and the fix will
    be included in the next build without further effort. And the diff for the
    fix (no doubt with an associated explanatory comment) would be visible in
    an easily-understood form to anybody viewing the commit history of your
    repo.

    This is why we have build scripts. The computer is a wonderful tool, in
    its ability to perform tedious, repetitive tasks that we humans do so
    badly. This is why we write programs; some of those programs get so
    complex (as in your example) that it becomes helpful to write smaller,
    simpler programs to ease the task of building those bigger, more complex programs, because that’s how we get the computer to help with the process. It’s an extra level of indirection, that lets us ascend higher on the complexity pyramid than we could manage if we didn’t have it.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 01:24:53 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 01:05, Lawrence D’Oliveiro wrote:
    On Mon, 3 Nov 2025 20:10:12 +0000, bart wrote:

    By coincidence, here is some init data I had to generate today:

    [long array of hex machine-code numbers omitted]

    If you look at Free Software licences, they have a definition for what “source code” means: it is “the preferred form” for doing development with.

    Regardless of whether your project is “Free Software” or not, I’m assuming
    that your project tree includes the source program (and necessary build scripts) for generating that long list of random-looking numbers that
    nobody in their right mind would want to look at. Otherwise, it’s going to be very hard for your employer to find somebody else to maintain your code
    if you should happen to get hit by a bus ...

    In which case, why are those numbers being included in your source? I
    would generate them from the *real* source (the one that a human would
    want to look at) as an automatic part of the build process. That way, any bugs found in that code could be fixed in just one place, and the fix will
    be included in the next build without further effort. And the diff for the fix (no doubt with an associated explanatory comment) would be visible in
    an easily-understood form to anybody viewing the commit history of your
    repo.

    This is why we have build scripts. The computer is a wonderful tool, in
    its ability to perform tedious, repetitive tasks that we humans do so
    badly. This is why we write programs; some of those programs get so
    complex (as in your example) that it becomes helpful to write smaller, simpler programs to ease the task of building those bigger, more complex programs, because that’s how we get the computer to help with the process. It’s an extra level of indirection, that lets us ascend higher on the complexity pyramid than we could manage if we didn’t have it.

    The bytes were generated from one program, captured into a text file,
    then pasted into another source.

    It's a temporary measure as I am transitioning from a version of a
    language that allows inline assembly (which allows a trivial solution
    for the LIBFFI problem) to one that doesn't.

    Eventually it will be a built-in IL/backend instruction (and the
    necessary sequence will be internally generated, like it is for
    everything else).

    But ATM, the workaround I had been using in the non-inline-ASM compiler
    was taking up more generated code, and that was mading it harder to
    compare generated code sizes across the two compiler versions.

    The original source for those bytes is shown below.




    ------------------------------------------------------------
    func calldll(ref proc fnaddr, ref[]u64 args, int nargs, retfloat)u64 =
    u64 a
    int pushedbytes

    pushedbytes:=0

    if nargs.odd then
    pushedbytes:=8
    asm push 0
    fi

    pushedbytes+:=nargs*8

    for i:=nargs downto 1 do
    a:=args[i]
    asm push u64 [a]
    od

    assem
    mov D10, [Dstack]
    movq XMM0, [Dstack]
    mov D11, [Dstack+8]
    movq XMM1, [Dstack+8]
    mov D12, [Dstack+16]
    movq XMM2, [Dstack+16]
    mov D13, [Dstack+24]
    movq XMM3, [Dstack+24]

    mov D0, [fnaddr]
    call D0
    add Dstack, [pushedbytes]
    mov B1, [retfloat]
    and B1, B1
    jz L100
    movq D0, XMM0
    L100:
    mov [a], D0
    end

    return a
    end


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@[email protected] to comp.lang.misc on Tue Nov 4 02:28:01 2025
    From Newsgroup: comp.lang.misc

    On Tue, 4 Nov 2025 01:24:53 +0000, bart wrote:

    The bytes were generated from one program, captured into a text file,
    then pasted into another source.

    That’s the process that should be automated as part of your build.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Tue Nov 4 07:07:38 2025
    From Newsgroup: comp.lang.misc

    On 04.11.2025 01:35, Andy Walker wrote:
    On 03/11/2025 20:10, bart wrote:
    [...]

    [...]

    I don't know what causes you to think it an "academic" language -- /apart/ from the unfortunate fact that the first few textbooks on A68 were very
    bad, and impractical for proper teaching. [Both Pascal and C fared much better in this regard.]

    Incidentally, in my case, the Algol 68 textbook I had was quite good
    (it was from 1975). OTOH, the Pascal book I had was not very good to
    understand and difficult to read, a bit like a standard; nonetheless
    good for a precise understanding of Pascal. And, different from the
    valuations of others (I suppose), the K&R bible I didn't consider to
    be a good book; it was lacking the preciseness. (Mileages may vary.
    And I can only show my experiences from a specific own perspective.)
    But those being all standard languages (as opposed to any home-brewed language-specialities) there's usually some choice finding textbooks
    that fit for one's taste and need.

    Re Algol 68; it might have contributed that this language had also
    been the language syntax of choice for explaining algorithms at our
    university back then. But I think its _conceptual clearness_ is and
    was what actually made the difference!

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Tue Nov 4 07:16:57 2025
    From Newsgroup: comp.lang.misc

    On 04.11.2025 00:37, bart wrote:
    On 03/11/2025 21:35, Janis Papanagnou wrote:
    On 03.11.2025 21:34, bart wrote:
    On 03/11/2025 20:02, Janis Papanagnou wrote:
    On 03.11.2025 18:00, bart wrote:

    Clearly, you don't care for language design at all.

    Au contraire!

    You are missing so many things - even if explicitly and multiply
    having been pointed to! - that I'm not astonished that you missed
    that too!

    You've regularly shown that you're so focused on [less important]
    details that you're regularly missing the big picture! - This could
    be seen for software projects, components, design, environments,
    standards, methods, and much more...

    [...]

    So, you're saying this is just concentrating on the details? I'd be
    interested in what the big picture is then.

    I've named some above and you've documented that all in hundreds of
    your posts in comp.lang.c and can read that in the responses.

    [...]

    So, what am I missing? Enlighten me; [...]

    Given all the discussions that people had with you of over the past
    years, and your obvious inability to see it (or understand it when
    hinted), there's no point in wasting time repeating or summarizing
    all that for you. - Good luck with all you do!

    If you want to discuss [common] languages and features, be my guest.

    Janis

    [...]


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 11:10:45 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 06:16, Janis Papanagnou wrote:
    On 04.11.2025 00:37, bart wrote:
    On 03/11/2025 21:35, Janis Papanagnou wrote:
    On 03.11.2025 21:34, bart wrote:
    On 03/11/2025 20:02, Janis Papanagnou wrote:
    On 03.11.2025 18:00, bart wrote:

    Clearly, you don't care for language design at all.

    Au contraire!

    You are missing so many things - even if explicitly and multiply
    having been pointed to! - that I'm not astonished that you missed
    that too!

    You've regularly shown that you're so focused on [less important]
    details that you're regularly missing the big picture! - This could
    be seen for software projects, components, design, environments,
    standards, methods, and much more...

    [...]

    So, you're saying this is just concentrating on the details? I'd be
    interested in what the big picture is then.

    I've named some above and you've documented that all in hundreds of
    your posts in comp.lang.c and can read that in the responses.

    [...]

    So, what am I missing? Enlighten me; [...]

    Given all the discussions that people had with you of over the past
    years, and your obvious inability to see it (or understand it when
    hinted), there's no point in wasting time repeating or summarizing
    all that for you. - Good luck with all you do!

    In that case, I'll have to guess what it is you have in mind, as I'm
    still curious.

    Is this about using existing languages, tools and operating systems - in
    short knowing your way around Unix/Linux-based eco-systems?

    Since I never did any of that (as you can see, I was rather busy for a
    start, and never used Unix/Linux!) and tend to be critical of them when
    forced to deal with it.

    I noticed that threads come alive when people can share their knowledge
    and tips and tricks.

    I also noticed that in the recent thread on comp.lang.c, where people
    were castigating me AND my machine (for being so 'slow', which of course
    was also my fault!), for not knowing how to speed up the building of
    apps like A68G.

    Apparently I needed to speed it up by using 'make -j', but I was suspicious.

    I've finally noticed that that thread has gone very quiet after I showed
    that the main cause of the slowdown was cruft in the build script. The slowness was a symptom, but 'make -j' hid the symptom and left the
    underlying cause.

    More people should question such things rather than shrugging their
    shoulders, dismissing them because it's a 'one off', or brushing them
    under the carpet.



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 12:24:47 2025
    From Newsgroup: comp.lang.misc

    On 03/11/2025 21:31, Janis Papanagnou wrote:
    On 03.11.2025 21:10, bart wrote:

    char data[] = {
    <block of text from above>
    };

    Now, you're saying I ought to know what goes inside '[]'.

    Well, yes. It's obviously 12 columns and 17 rows, as can quickly be
    seen. - Of course I would expect that you know what sort of data the
    program will generate, but if not, 12*17 = 170+34 = 204. If you have difficulties with simplest math - I think we've learned such things
    when being 8 or 9 years old - and if you need more than five seconds
    for that just pick from the simple language feature suggestions above instead.

    This is simply wrong. If a language (not A68, but using its syntax)
    REQUIRES you to write this:

    [n]INT a = (x1, x2, x3, .... xn)

    That is, the 'n' has to exactly match the count of items, then that is
    very poor. There are several issues

    - Finding out what N is in the first place
    - Having to keep N in sync with the number of items, as things change
    during development
    - Having to either hardcode a literal for N, which is usually a no-no,
    or needing to think up a name for it and define it separately

    You seem to be dismissing that first one. Even if it is trivial to work
    out, why do you need to bother? It is much better to just allow [] and
    then it doesn't matter what the count is.

    My data could have been all on one line. It could been read from an
    external file. That could have been generated from a process which is
    part of a build-script (LD'O's suggestion), then you will not know what
    it will be before you start to build.

    There some instances where you do need a count (for example it has to
    match something else in the program) so you can /optionally/ supply it,
    and the compiler can report a mismatch if the item count is wrong.

    Otherwise, things can get very tedious if you have to get ? exactly
    right here:

    char message[?] = "<some long string literal>";

    Some have better things to do!


    The largest set of data I've included this way I think was 100M numbers.
    That was testing embedding. But I have included actual binary data (eg.
    images and executables) like this too.

    I think hard-coding 10^8 numbers is not the wisest implementation,
    to say the least, but without knowing the details I won't discuss
    that; so let's just accept that the math (counting) is impractical
    and one of the other two options will be applied to store the data
    in-memory when using Algol 68.

    But would you really inline such amounts of data? - Or did you mean
    to read them in from external media?

    I mentioned embedding binary data, in cases where the language doesn't
    have such a feature built-in. There are utilities that can convert a
    file into a data-block suitable for a language such as C. Eg. my example
    will work in any language that accepts hex literals, or it could simple
    have used decimal.

    - But then you cannot use the
    initializer lists. - Whatever might apply for you, it doesn't seem
    to be a clever approach.

    BTW, as said, I most probably wouldn't store these amounts of data
    in-memory, but I'd also have some doubts whether a language like
    Algol 68, and specifically the Genie interpreter could handle that
    amount of data in the first place; after all the "Genie" appears
    to me to not have been trimmed to a low data space-consumption.
    And a quick test confirms that: "a68g: abend: not enough memory."
    So you'd have to use more intelligent solutions to process huge
    amounts of data with Genie.

    Or switch to other languages; I'm sure
    "C" does not have that issue since you're there operating on the
    lowest level.)

    Most scripting languages can deal with strings, and those can be large,
    eg. Python:

    a = "A" * 100_000_000
    print (len(a+a)) # 200000000

    I assume they can include binary data including embedded zeros.

    If A68G can't do that, then it's a QoI issue.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 14:57:39 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 00:35, Andy Walker wrote:
    On 03/11/2025 20:10, bart wrote:
    [...]> Maybe I will regenerate that data (perhaps it will be included
    from some
    file that I don't even look at) then I'd have to update the number.
    It just shouldn't be necessary.

        It isn't [in A68].  Use an identity declaration.  Or a flexible array,
    as Janis suggested.
    Those decades of real-life experience (whatever your opinions about
    that),
    opened my eyes more to its practicial deficiencies.

        (a) A68 is a language that is over 50 years old.  It belongs to the era of mainframes, with jobs fed to them by physically taking decks of
    cards
    to a computing centre.  The miracle is that it is still usable in the modern
    environment.

    Fortran is even older! I spent a year coding Fortran (ie. FORTRAN IV),
    and it was via a terminal like most other languages. But that language
    has also evolved.


    (b) What you call "deficiencies" are almost always simply
    cases
    that your private languages do differently.  But languages are not properly defined by merely giving examples;  you also need to give the syntax, in sufficient detail that readers can determine whether their own code
    conforms
    to that syntax.  Likewise the semantics.  What is /your/ proposed syntax for
    variable declarations?  Then we can compare that with what A68 does, and see
    what the trade-offs are.

    You mean, a formal grammar? I don't often get round to doing that, but I
    don't believe that would be useful unless you want to implement a
    parser. I never learn a language syntax from such things (does
    anybody?); I always look at examples.

    I have two languages with A68-inspired syntax. The systems language is
    much lower level than Algol68 (think C but with quite different syntax).

    Then, basic declarations are:

    const [int] a = x # 'int' is optional
    int b = x # at file scope

    static int c = x # inside a function
    int d := y # inside a function
    d := y # (assignment) inside a function

    'x' represents a compile-time or load-time expression
    'y' is any runtime expression

    So '=' is used for identities, defining new named entities at
    compile-time, and ':=' is for anything that happens at run-time. (That
    is aside from '=' used as an equality operator.)

    When it comes to array bounds, then when provided they must be
    compile-time expressions. They are optional for the leftmost dimension
    of an array:

    []int a = (10, 20, 30) # compiler fills in the length
    [4]int b = (10, 20, 30, 40) # bounds must match exactly
    []int c # allowed ATM but not advised
    ref[]int d # Unbounded is mainly when a ref target

    There are no dynamic (set size once at runtime) or flex (can grow or
    shrink) arrays; those need to be implemented in user code. There are
    slices however:

    slice[]int e := a # bounds are 1..3, but is a view into a

    e := b[2..3] # bounds are now 1..2; a view into b

    for x in e do
    println x # prints 20 30 on 2 lines
    od

    These carry their length, but are not automatically flex.

    This is an example of using those [] bounds where JP suggested it was
    trivial to count the values; this embeds its own compiler:

    []byte compiler = binclude("/m/mm.exe")

    proc main =
    println compiler.len # shows 448512
    println ref u16(&compiler)^:"m" # shows MZ (PE file stub)
    end


                                  It's clearly a language that
    belongs more in academia.

        Yet the first implementations were from RRE [defence establishment!] and it was, to my personal knowledge, used in engineering, natural language translation, data processing, accountancy, train routing, forestry, and
    many
    other areas of [1970s] computing, as well as many aspects of CS and maths.
    I don't know what causes you to think it an "academic" language --

    The nature of the RR suggests that very strongly. It also does give the impression that the language is perfect! Since it is so meticulously
    designed, the slightest change would break it.

    As a practical language now, you're right that I don't care for it.
    Stropping schemes, such as that used in A68G for example, render it
    unreadable to my eyes. The semicolon rules are just a nuisance (notice
    my examples above do not use stropping, and don't use semicolons).

    And after years of being used to syntactically bounded functions
    (terminated by } or 'end'), too many examples of Algol68 use what look
    like open, dangling function bodies.

    Having code outside of functions is also what scripting languages do. To
    me it seems undisciplined for a more 'serious' language.

    /apart/
    from the unfortunate fact that the first few textbooks on A68 were very
    bad,
    and impractical for proper teaching.  [Both Pascal and C fared much
    better in
    this regard.]

    Another aspect, with A68G at least, is that there are lots of cryptic
    error messages which uses nomenclature from the Report. For example:

    a68: syntax error: 1: construct beginning with a serial-clause starting
    in line 1 followed by "." and
    then a formula, an enquiry-clause starting in line 2 is not a valid serial-clause.




    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@[email protected] to comp.lang.misc on Tue Nov 4 16:46:26 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 12:10, bart wrote:

    I've finally noticed that that thread has gone very quiet after I showed that the main cause of the slowdown was cruft in the build script. The slowness was a symptom, but 'make -j' hid the symptom and left the underlying cause.

    Just to be clear here - threads like that on comp.lang.c tend to go
    quite because people have got fed up repeating the same things, offering advice and help that is ignored, asking questions that are left
    unanswered, and seeing nothing but off-topic navel-gazing claims about
    how wonderful your personal languages are. (Your languages are topical
    here in comp.lang.misc, and I have nothing against discussing them here,
    but they are very much off-topic in c.l.c.)

    When you post something new, I think it is reasonable to expect more responses.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@[email protected] to comp.lang.misc on Tue Nov 4 17:02:23 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 13:24, bart wrote:
    On 03/11/2025 21:31, Janis Papanagnou wrote:
    On 03.11.2025 21:10, bart wrote:

        char data[] = {
           <block of text from above>
        };

    Now, you're saying I ought to know what goes inside '[]'.

    Well, yes. It's obviously 12 columns and 17 rows, as can quickly be
    seen. - Of course I would expect that you know what sort of data the
    program will generate, but if not, 12*17 = 170+34 = 204. If you have
    difficulties with simplest math - I think we've learned such things
    when being 8 or 9 years old - and if you need more than five seconds
    for that just pick from the simple language feature suggestions above
    instead.

    This is simply wrong. If a language (not A68, but using its syntax)
    REQUIRES you to write this:

        [n]INT a = (x1, x2, x3, .... xn)

    That is, the 'n' has to exactly match the count of items, then that is
    very poor.

    As a general point, I agree. Computers are really good at mundane tasks
    like counting items - humans are not. Let the compiler do the counting.

    There is a balance to be found between having redundant information in
    the source code (like the count for initialisers like this), and letting
    the compiler figure them out. A little redundancy is helpful to reduce
    the risk of typos and other small errors. But if the redundancy
    involves significant work or a risk of mistakes in itself, then it is
    not helpful.

    There are several issues

    - Finding out what N is in the first place
    - Having to keep N in sync with the number of items, as things change
      during development
    - Having to either hardcode a literal for N, which is usually a no-no,
      or needing to think up a name for it and define it separately


    Agreed.

    You seem to be dismissing that first one. Even if it is trivial to work
    out, why do you need to bother? It is much better to just allow [] and
    then it doesn't matter what the count is.

    My data could have been all on one line. It could been read from an
    external file. That could have been generated from a process which is
    part of a build-script (LD'O's suggestion), then you will not know what
    it will be before you start to build.


    Yes. Compiler counting here is particular useful when the data is
    coming from outside, perhaps controlled by a build system (like make).
    Perhaps you use something like "hexdump" to turn a data file into a list
    of hex codes, and then use an include mechanism (like C's #include), or
    C23's #embed. Not having to specify the length makes things easier.

    There some instances where you do need a count (for example it has to
    match something else in the program) so you can /optionally/ supply it,
    and the compiler can report a mismatch if the item count is wrong.

    Otherwise, things can get very tedious if you have to get ? exactly
    right here:

      char message[?] = "<some long string literal>";

    Some have better things to do!



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 16:17:34 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 15:46, David Brown wrote:
    On 04/11/2025 12:10, bart wrote:

    I've finally noticed that that thread has gone very quiet after I
    showed that the main cause of the slowdown was cruft in the build
    script. The slowness was a symptom, but 'make -j' hid the symptom and
    left the underlying cause.

    Just to be clear here - threads like that on comp.lang.c tend to go
    quite because people have got fed up repeating the same things, offering advice and help that is ignored, asking questions that are left
    unanswered, and seeing nothing but off-topic navel-gazing claims about
    how wonderful your personal languages are.  (Your languages are topical here in comp.lang.misc, and I have nothing against discussing them here,
    but they are very much off-topic in c.l.c.)

    When you post something new, I think it is reasonable to expect more responses.


    People were offering wrong or misguided advice. They were criticising
    the wrong things (me, and my poor 4-yo (not 15-yo) machine!) rather than
    the process.

    The upshot is that there were superfluous being done in the two-step
    build process (configure followed by parts of the make) that were
    handled efficiently on Linux-like systems, or not badly enough to
    notice, but inefficiently on Windows systems, even under WSL.

    The far better solution is to streamlined the process, rather than throw
    more hardware resources at it. And who knows, maybe it will be faster on native Linux too.

    This represents an utterly different attitude. But which one is right?

    Notice this had nothing to do with my projects, other than the latter demonstrated that there was nothing wrong with the capabilities of my
    PC. The process and tools you favour just happen be magnitudes slower.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Tue Nov 4 17:26:39 2025
    From Newsgroup: comp.lang.misc

    On 04.11.2025 16:46, David Brown wrote:
    On 04/11/2025 12:10, bart wrote:

    I've finally noticed that that thread has gone very quiet after I
    showed that the main cause of the slowdown was cruft in the build
    script. The slowness was a symptom, but 'make -j' hid the symptom and
    left the underlying cause.

    Just to be clear here - threads like that on comp.lang.c tend to go
    quite because people have got fed up repeating the same things, offering advice and help that is ignored, asking questions that are left
    unanswered, and seeing nothing but off-topic navel-gazing claims about
    how wonderful your personal languages are. (Your languages are topical
    here in comp.lang.misc, and I have nothing against discussing them here,
    but they are very much off-topic in c.l.c.)

    Well said.

    Indeed I read your post, while having completely ignored (not read)
    bart's reply; at some point when all is said - sometimes, depending
    on the poster, when all has been said even multiple times - it's not
    worth to waste more time. (Maybe I'll come back later to the unread
    posts, but they might then have already expired.)

    The only drawback is that he might think non-responding means that
    he's right - but that's meaningless; attentive readers will judge
    themselves which facts they find worthwhile and right, and what not.

    Just one point; while it is (as you said) indeed topical here I'd
    not be happy if he'll expose the same pathological behavior here
    that he's shown for ages in c.l.c (those things you listed above).

    Janis


    When you post something new, I think it is reasonable to expect more responses.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@[email protected] to comp.lang.misc on Tue Nov 4 17:49:40 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 17:26, Janis Papanagnou wrote:
    On 04.11.2025 16:46, David Brown wrote:
    On 04/11/2025 12:10, bart wrote:

    I've finally noticed that that thread has gone very quiet after I
    showed that the main cause of the slowdown was cruft in the build
    script. The slowness was a symptom, but 'make -j' hid the symptom and
    left the underlying cause.

    Just to be clear here - threads like that on comp.lang.c tend to go
    quite because people have got fed up repeating the same things, offering
    advice and help that is ignored, asking questions that are left
    unanswered, and seeing nothing but off-topic navel-gazing claims about
    how wonderful your personal languages are. (Your languages are topical
    here in comp.lang.misc, and I have nothing against discussing them here,
    but they are very much off-topic in c.l.c.)

    Well said.

    Indeed I read your post, while having completely ignored (not read)
    bart's reply; at some point when all is said - sometimes, depending
    on the poster, when all has been said even multiple times - it's not
    worth to waste more time. (Maybe I'll come back later to the unread
    posts, but they might then have already expired.)


    To be clear here - I explained why I thought the thread in c.l.c. ebbed
    away. I have nothing against discussing other things with Bart. There
    are some topics that end up going nowhere, and while I am regularly
    seduced in to talking about them again, in the end I think the only appropriate action is to leave the discussion. But on other topics, I
    will try to respond to the posts as I read them. Here in c.l.misc, his languages are as much on-topic as Algol 68, and I don't see a problem
    with comparisons. If the discussion is not leading to anything
    interesting (after all, details of a private language are not directly relevant to anyone else), people can move away from the subject.

    The only drawback is that he might think non-responding means that
    he's right - but that's meaningless; attentive readers will judge
    themselves which facts they find worthwhile and right, and what not.

    Just one point; while it is (as you said) indeed topical here I'd
    not be happy if he'll expose the same pathological behavior here
    that he's shown for ages in c.l.c (those things you listed above).


    Bart rubs many people the wrong way. But I know there are people who
    don't like some of my posting styles - indeed I can't think of any
    regulars in c.l.c. or here who don't occasionally make posts that
    irritate at least some people. All I can say is that it is best to
    respond to the content of posts when you have something useful to say,
    and try not to respond too much to the person - and if things get too
    heated (as they have done in some of my posts), back away and cool down.

    On the whole, while Bart regularly misunderstands C and fails to learn
    from others, and seems to be in a class of his own when it comes to have trouble with regular programming or software build tasks, his posts
    often spur interesting discussions, and there is often agreement in some
    of the things he says.

    Janis


    When you post something new, I think it is reasonable to expect more
    responses.



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Tue Nov 4 18:38:39 2025
    From Newsgroup: comp.lang.misc

    On 04.11.2025 17:49, David Brown wrote:


    [...] Here in c.l.misc, his languages are as much on-topic as Algol 68,

    Sure.

    and I don't see a problem with comparisons.

    There's many problems if you try to compare well known (specified)
    languages with home-brewed languages. All we typically see then is
    examples of local specific details, thereby completely missing the
    whole picture. It makes no sense to compare with such languages on
    that level. (YMMV.)

    [...] All I can say is that it is best to
    respond to the content of posts when you have something useful to say,
    and try not to respond too much to the person - [...]

    Yes, and this is often, as in this specific personal case, hard to
    achieve...

    On the whole, while Bart regularly misunderstands C and fails to learn
    from others, and seems to be in a class of his own when it comes to have trouble with regular programming or software build tasks, his posts
    often spur interesting discussions, and there is often agreement in some
    of the things he says.

    ...as we see.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 18:28:32 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 16:49, David Brown wrote:
    On 04/11/2025 17:26, Janis Papanagnou wrote:

    If the discussion is not leading to anything
    interesting (after all, details of a private language are not directly relevant to anyone else

    Why not? People can talk about hypothetical language features, can't they?

    Then what does it matter if they happen to be part of an actual, working language?

    I for one would give more weight to a feature that had been proven in
    the field by being part of a working implementation.

    I will also mention when a feature works poorly or has been dropped.

    from others, and seems to be in a class of his own when it comes to have trouble with regular programming or software build tasks,

    Yes. I haven't been brainwashed by Unix, and only encountered C very
    late. So I have loads of experience of using quite viable alternatives.

    All I can say about the former is that it is better than Windows at
    building software designed to be built on Unix, which is no surprise.



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Tue Nov 4 19:30:12 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 17:38, Janis Papanagnou wrote:
    On 04.11.2025 17:49, David Brown wrote:


    [...] Here in c.l.misc, his languages are as much on-topic as Algol 68,

    Sure.

    and I don't see a problem with comparisons.

    There's many problems if you try to compare well known (specified)
    languages with home-brewed languages. All we typically see then is
    examples of local specific details, thereby completely missing the
    whole picture. It makes no sense to compare with such languages on
    that level. (YMMV.)

    That would be an interesting discussion, as to why you think the
    provenance or history of a language, and of its implementation, somehow invalidates comparisons of their features, performance, and general utility.

    I'd also be interested in how much your views would be driven by
    personal animosity.

    (I'm also still waiting on that 'whole picture' thing.)


    [...] All I can say is that it is best to
    respond to the content of posts when you have something useful to say,
    and try not to respond too much to the person - [...]

    Yes, and this is often, as in this specific personal case, hard to
    achieve...

    On the whole, while Bart regularly misunderstands C and fails to learn
    from others, and seems to be in a class of his own when it comes to have
    trouble with regular programming or software build tasks, his posts
    often spur interesting discussions, and there is often agreement in some
    of the things he says.

    ...as we see.

    Janis


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@[email protected] to comp.lang.misc on Tue Nov 4 21:04:35 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 20:30, bart wrote:
    On 04/11/2025 17:38, Janis Papanagnou wrote:
    On 04.11.2025 17:49, David Brown wrote:


    [...] Here in c.l.misc, his languages are as much on-topic as Algol 68,

    Sure.

    and I don't see a problem with comparisons.

    There's many problems if you try to compare well known (specified)
    languages with home-brewed languages. All we typically see then is
    examples of local specific details, thereby completely missing the
    whole picture. It makes no sense to compare with such languages on
    that level. (YMMV.)

    That would be an interesting discussion, as to why you think the
    provenance or history of a language, and of its implementation, somehow invalidates comparisons of their features, performance, and general
    utility.


    One aspect of this that I see (I can't speak for Janis, of course) is
    that widespread languages have to handle a wide range of users and
    use-cases. Personalised languages are only used by one person, and for
    a small range of tasks. So you can easily be blinded by thinking only
    in terms of what /you/ would write in your language, not what other
    people might write.

    For example, I could say that C's type syntax is clear and obvious -
    because whenever I write C code, the type syntax /is/ clear and obvious.
    But that would be ignoring the possibility that someone else would
    write "* * int (*)(int (*int)" as a type. For /your/ language, you
    /can/ ignore the possibility that someone will write something horrible, because you are the only one writing in it, and you don't write horrible
    code (I assume!). Comparisons are thus between the best of your
    language, and the worst of other languages (whether it be C, Algol, or anything else).

    Then there is the "battle-tested" aspect. While I realise you wrote real-world code in your languages, they are not "battle-tested" in the
    manner of widespread languages - again, because you are "nice" to your language and tools.

    We can see this in particular when modifying the language. If you want
    to add support for 24-bit integers, you can hack on a "tribyte" keyword
    and type fairly quickly by adding it to the source code of your
    compiler. In a mainstream language, such a change needs serious
    consideration about how it fits with the language, any conflicts with
    existing code (that could be millions of files), conflicts or
    ambiguities with existing language constructs and syntax, how it could
    work on multiple different types of target with different sized words,
    what it would mean to tool implementers, how to make changes to the
    standards, how many books, tutorials and references need to be updated,
    what precedences it sets for the future of the language, whether there
    are better or more general ways of achieving the same effect (like
    adding "_BitInt()" to C23) and if it is actually all worth the bother.

    I /do/ think there can be some interesting comparisons made, because
    there are some common features and requirements, but it must be clear
    that you are comparing a home-made go-kart with cars, trucks, planes and ships. Your go-kart might be better suited to some tasks, but it is not
    an apples-to-apples comparison.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@[email protected] to comp.lang.misc on Tue Nov 4 21:14:22 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 19:28, bart wrote:
    On 04/11/2025 16:49, David Brown wrote:
    On 04/11/2025 17:26, Janis Papanagnou wrote:

    If the discussion is not leading to anything interesting (after all,
    details of a private language are not directly relevant to anyone else

    Why not? People can talk about hypothetical language features, can't they?

    Sure. And people might learn something, or be inspired - especially
    those that are interested in making their own languages. But in the
    end, no one else will ever use your language, so the details don't
    actually matter. (I think the same applies to a large extent to dead or near-dead languages, including Algol.)


    Then what does it matter if they happen to be part of an actual, working language?

    I for one would give more weight to a feature that had been proven in
    the field by being part of a working implementation.


    So would I, when thinking about features that could be included in
    future languages. But I would not count either your language or even
    Algol 68 (as distinct from Algol) as sufficiently field-tested to be comparable to mainstream languages. Your work with your language is not negligible, but it is still just the work of one person in one field.

    I will also mention when a feature works poorly or has been dropped.


    Good.

    from others, and seems to be in a class of his own when it comes to
    have trouble with regular programming or software build tasks,

    Yes. I haven't been brainwashed by Unix, and only encountered C very
    late. So I have loads of experience of using quite viable alternatives.


    Lots of us have used lots of languages, and lots of OS's. Developers' preferences for *nix and its tools is not brainwashing (who would be
    doing the brainwashing here? Who benefits, in your conspiracy theory?).
    It is just experience, and the fact that lots of software developers
    find these tools work well for their needs. And there are other
    software developers who swear by Windows, or MacOS, or "real" UNIX (TM),
    or VMS, or something else entirely. Most are well aware of the
    disadvantages and challenges they have with their systems and tools, and
    very few people think they are perfect. The same goes for languages.

    All I can say about the former is that it is better than Windows at
    building software designed to be built on Unix, which is no surprise.




    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Wed Nov 5 12:25:43 2025
    From Newsgroup: comp.lang.misc

    On 04.11.2025 13:24, bart wrote:
    On 03/11/2025 21:31, Janis Papanagnou wrote:
    On 03.11.2025 21:10, bart wrote:

    char data[] = {
    <block of text from above>
    };

    Now, you're saying I ought to know what goes inside '[]'.

    Well, yes. It's obviously 12 columns and 17 rows, as can quickly be
    seen. - Of course I would expect that you know what sort of data the
    program will generate, but if not, 12*17 = 170+34 = 204. If you have
    difficulties with simplest math - I think we've learned such things
    when being 8 or 9 years old - and if you need more than five seconds
    for that just pick from the simple language feature suggestions above
    instead.

    This is simply wrong. If a language (not A68, but using its syntax)
    REQUIRES you to write this:

    [n]INT a = (x1, x2, x3, .... xn)

    That is, the 'n' has to exactly match the count of items, then that is
    very poor. There are several issues

    Then just don't write it (that 'n') (in Algol 68)

    [] INT a = (x1, x2, x3, ..., xn)


    - Finding out what N is in the first place

    There's nothing to "find out" (if the data is literally present).

    - Having to keep N in sync with the number of items, as things change
    during development

    Use the appropriate flexible data structures to store various amounts
    of data in arrays (in Algol 68)

    REF [0:-1] INT a := (x1, x2, x3, ...)

    - Having to either hardcode a literal for N, which is usually a no-no,
    or needing to think up a name for it and define it separately

    There's no need to "hard-code" the array size (in Algol 68)

    INT n = get_int_from_where_appropriate;
    [n] INT a := (x1, x2, x3, ..., xn)

    or (more realistically without a static initializer list)

    INT n = get_int_from_where_appropriate;
    [n] INT a;
    fill_data_from_where_it_comes (a, n);

    where 'n' can be calculated, read in, [automatically] counted, etc.


    You seem to be dismissing that first one. Even if it is trivial to work
    out, why do you need to bother?

    You don't need to bother. (See above.)

    It is much better to just allow [] and
    then it doesn't matter what the count is.

    Have you considered the "pros" and "cons" of allowing variability
    (exceptions, special cases) in syntaxes? (We see tons of examples,
    bad examples, cf. e.g. "C".)

    A "normal" array in Algol 68 is an object with fixed size! There's
    no such thing as the unspecified declaration

    [] int a;

    For unknown (or possibly variable, or changing) array sizes use

    FLEX [0:-1] a;

    I suggest (for the fourth time!) to use the appropriate structures.


    My data could have been all on one line.

    I don't know about you, but I usually format my program (and data)
    to obtain readable and maintainable code.

    It could been read from an external file.

    Then you would not have the static initializer-lists that were part
    of all examples you depicted. (You seem to be switching goalposts.)

    That could have been generated from a process which is
    part of a build-script (LD'O's suggestion), then you will not know what
    it will be before you start to build.

    Yes. - And I'm thinking about what I'd do, say, in "C" (or Algol 68).
    Since we have no flexible and dynamically extensible constructs here
    we need some more clever approach. If data comes from outside context
    you need means to provide that information; the generator might count
    and provide the information with the data he generates, or, if not,
    an additional preprocessing (like wc -w) could be inserted to provide
    the necessary information, or read in the data (as it comes, as text)
    into a string and have the application count the semantic elements
    before they get stored in the typed array.

    How would you, in "C" (or Algol 68), get information of dynamic size
    read into static structures? - realloc() on each element? realloc()
    on chunks of data? Fixed size arrays of abnormal length 'int a[10^8]'
    (that may still fail in yet more pathological cases)?


    There some instances where you do need a count (for example it has to
    match something else in the program) so you can /optionally/ supply it,
    and the compiler can report a mismatch if the item count is wrong.

    Otherwise, things can get very tedious if you have to get ? exactly
    right here:

    char message[?] = "<some long string literal>";

    In Algol 68, here as well, there's no need to provide the length

    [] CHAR message = "<some long string literal>"

    or

    STRING message = "<some long string literal>"


    Some have better things to do!

    Indeed. - I'd therefore suggest to use Algol 68. (Unless other aspects
    prevents you from choosing that language - I'm sure there are for you!)



    The largest set of data I've included this way I think was 100M numbers. >>> That was testing embedding. But I have included actual binary data (eg.
    images and executables) like this too.

    I think hard-coding 10^8 numbers is not the wisest implementation,
    to say the least, but without knowing the details I won't discuss
    that; so let's just accept that the math (counting) is impractical
    and one of the other two options will be applied to store the data
    in-memory when using Algol 68.

    But would you really inline such amounts of data? - Or did you mean
    to read them in from external media?

    I mentioned embedding binary data, in cases where the language doesn't
    have such a feature built-in. There are utilities that can convert a
    file into a data-block suitable for a language such as C. Eg. my example
    will work in any language that accepts hex literals, or it could simple
    have used decimal.

    [...]

    Most scripting languages can deal with strings, and those can be large,
    eg. Python:

    a = "A" * 100_000_000
    print (len(a+a)) # 200000000

    I assume they can include binary data including embedded zeros.

    If A68G can't do that, then it's a QoI issue.

    Have you tried? - You can do, similar to the syntax above (in Algol 68)

    STRING s = "A" * 1 000 000;
    print (UPB (s+s))

    As I've mentioned before (in another post) you may not expect arbitrary
    sizes with the Genie interpreter. (A size of 10^8 wasn't possible in my standard configuration/setting.) But functionally it's possible.

    But your example leaves me (yet again) with the impression that you are
    just desperately seeking some detail, some feature, that Algol 68 does
    not support, just to make the point that Algol 68 would be inferior to
    this or that language. With a bit open-mindedness you can easily see -
    despite Algol 68 being an almost dead dinosaur - how clever its design
    and how powerful its features are, how readable the code and reliable.
    I'd have liked to see such sophistication in many of the later designed languages (that partly were, to my honest astonishment, often so badly timbered).

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Wed Nov 5 12:52:47 2025
    From Newsgroup: comp.lang.misc

    On 04.11.2025 20:30, bart wrote:
    On 04/11/2025 17:38, Janis Papanagnou wrote:
    On 04.11.2025 17:49, David Brown wrote:


    [...] Here in c.l.misc, his languages are as much on-topic as Algol 68,

    Sure.

    and I don't see a problem with comparisons.

    There's many problems if you try to compare well known (specified)
    languages with home-brewed languages. All we typically see then is
    examples of local specific details, thereby completely missing the
    whole picture. It makes no sense to compare with such languages on
    that level. (YMMV.)

    That would be an interesting discussion, as to why you think the
    provenance or history of a language, and of its implementation, somehow invalidates comparisons of their features, performance, and general
    utility.

    To compare languages we need to have a substantial representation
    of the compared languages. This is easy for known languages, this
    is pointless for, e.g., irrelevant home-brewed languages; on a
    feature-basis alone a _language comparison_ makes no sense and a
    feature comparison makes little sense with this type of languages.

    Someone else already observed and rightly pointed out that most
    of your objections are obviously merely your personal preferences.
    After the many posts I'd have to add that it's also deliberate or
    intellectual ignorance of the (repeatedly) presented facts.


    I'd also be interested in how much your views would be driven by
    personal animosity.

    My views are generally just based on my experience and knowledges
    _on the topics_.

    I'm generally trying to honestly explain - also to you - what you
    are (often obviously) just missing. I even repeat the facts that
    you ignore. (Any "personal animosity" you may feel might likely
    stem from you ignoring of what's explained and demonstrated often
    multiple times to you. - My patience is not unlimited.)


    (I'm also still waiting on that 'whole picture' thing.)

    It's already been said:
    Given all the discussions that people had with you of over the past
    years, and your obvious inability to see it (or understand it when
    hinted), there's no point in wasting time repeating or summarizing
    all that for you. - Good luck with all you do!

    Janis

    [...]


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Wed Nov 5 14:12:54 2025
    From Newsgroup: comp.lang.misc

    Typo alert!

    On 05.11.2025 12:25, Janis Papanagnou wrote:
    [...]
    Use the appropriate flexible data structures to store various amounts
    of data in arrays (in Algol 68)

    REF [0:-1] INT a := (x1, x2, x3, ...)

    FLEX [0:-1] INT a := (x1, x2, x3, ...)

    [...]


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Wed Nov 5 14:02:16 2025
    From Newsgroup: comp.lang.misc

    On 05/11/2025 11:52, Janis Papanagnou wrote:
    On 04.11.2025 20:30, bart wrote:
    On 04/11/2025 17:38, Janis Papanagnou wrote:
    On 04.11.2025 17:49, David Brown wrote:


    [...] Here in c.l.misc, his languages are as much on-topic as Algol 68, >>>
    Sure.

    and I don't see a problem with comparisons.

    There's many problems if you try to compare well known (specified)
    languages with home-brewed languages. All we typically see then is
    examples of local specific details, thereby completely missing the
    whole picture. It makes no sense to compare with such languages on
    that level. (YMMV.)

    That would be an interesting discussion, as to why you think the
    provenance or history of a language, and of its implementation, somehow
    invalidates comparisons of their features, performance, and general
    utility.

    To compare languages we need to have a substantial representation
    of the compared languages. This is easy for known languages,

    What is a 'known' language?

    Rosetta Code has nearly a thousand languages, including some very
    obscure ones (mine's in there too!).

    Obviously, /somebody/ thinks such a website that compares how you do
    some task across lots of disparate languages is worthwhile.

    I can appreciate the utility of a feature, the aesthetics of otherwise
    of a syntax, the brevity or long-windedness of style, without caring
    where that language came from or whether or not it's in wide use.

    Your objections seem to ne irrational.

    this
    is pointless for, e.g., irrelevant home-brewed languages;

    [Indirect insult]

    A language is a language, in the same way that a home-cooked meal is
    just as much a meal as one from a restaurant or mass-produced for a supermarket.

    A language is just a means to get some task done that is better than
    some lower-level alternative.



    on a
    feature-basis alone a _language comparison_ makes no sense and a
    feature comparison makes little sense with this type of languages.

    Suppose the discussion was about new module schemes, or the best way to implement embedding.

    So, if I came up with suitable proposals, would you dismiss them out of
    hand because they came from me? Would it make any difference whether I
    had implemented them in a working language?

    What would happen if you sneered at my proposals, but then those exact
    schemes appeared in a language you admired?

    But, let me guess, C++'s proposals for both of these (they may even
    exist now), which always come across as an over-elaborate dog's
    breakfast to me, would automatically be fine for you?

    Someone else already observed and rightly pointed out that most
    of your objections are obviously merely your personal preferences.
    Some yes, but also they are what worked best. (Eg. my current module
    scheme is my fourth.)

    After the many posts I'd have to add that it's also deliberate or intellectual ignorance

    [Insult]

    of the (repeatedly) presented facts.

    There are few facts about PL design. It's more craft than engineering.

    Look at the 1000 languages on Rosetta Code; it's a zoo, because
    everyone's got a different opinion of what a language should be.



    I'd also be interested in how much your views would be driven by
    personal animosity.

    My views are generally just based on my experience and knowledges
    _on the topics_.

    Hey, so are mine! But apparently yours count, and mine can be dismissed,
    even though I'm in the unusual position of devising /and implemented/ languages of my own.

    Maybe you think that the only valid languages are huge, mainstream ones created by committees, and controlled by corporations.

    I'm generally trying to honestly explain - also to you - what you
    are (often obviously)

    [Insult?]

    just missing. I even repeat the facts that
    you ignore. (Any "personal animosity" you may feel might likely
    stem from you ignoring of what's explained and demonstrated often
    multiple times to you. - My patience is not unlimited.)


    (I'm also still waiting on that 'whole picture' thing.)

    It's already been said:
    Given all the discussions that people had with you of over the past
    years, and your obvious inability

    [Insult]

    to see it (or understand it when
    hinted), there's no point in wasting time repeating or summarizing
    all that for you. - Good luck with all you do!

    You could just tell me anyway. Otherwise I'd be inclined to think there
    is no 'big picture'.

    Or you can be honest and admit if you're just being snobbish and elitist.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Wed Nov 5 14:28:14 2025
    From Newsgroup: comp.lang.misc

    On 05/11/2025 11:25, Janis Papanagnou wrote:
    On 04.11.2025 13:24, bart wrote:

    This is simply wrong. If a language (not A68, but using its syntax)
    REQUIRES you to write this:

    [n]INT a = (x1, x2, x3, .... xn)

    That is, the 'n' has to exactly match the count of items, then that is
    very poor. There are several issues

    Then just don't write it (that 'n') (in Algol 68)

    [] INT a = (x1, x2, x3, ..., xn)

    You seem to have missed a couple of things:

    (1) This is not about Algol68
    (2) This is specifically where a language needs those bounds up-front

    Becase you stated there you saw no problem in discovering and having to include those bounds.

    Since I've given some examples of where that would be awkward or
    impossible, and haven't convinced you, I won't bother any further.

    It could been read from an external file.

    Then you would not have the static initializer-lists that were part
    of all examples you depicted. (You seem to be switching goalposts.)

    That could have been generated from a process which is
    part of a build-script (LD'O's suggestion), then you will not know what
    it will be before you start to build.

    Yes. - And I'm thinking about what I'd do, say, in "C" (or Algol 68).
    Since we have no flexible and dynamically extensible constructs here
    we need some more clever approach. If data comes from outside context
    you need means to provide that information; the generator might count
    and provide the information with the data he generates, or, if not,
    an additional preprocessing (like wc -w) could be inserted to provide
    the necessary information, or read in the data (as it comes, as text)
    into a string and have the application count the semantic elements
    before they get stored in the typed array.

    How would you, in "C" (or Algol 68), get information of dynamic size
    read into static structures? - realloc() on each element? realloc()
    on chunks of data? Fixed size arrays of abnormal length 'int a[10^8]'
    (that may still fail in yet more pathological cases)?

    I don't understand what you're saying. An example in C might look like this:

    char data[] = {
    #include "file1" // both contain comma-delimited sequences
    #include "file2"
    };

    This would be static data object. It is vastly more convenient to have
    those bounds unspecified.

    I expect we're talking at cross-purposes.


    There some instances where you do need a count (for example it has to
    match something else in the program) so you can /optionally/ supply it,
    and the compiler can report a mismatch if the item count is wrong.

    Otherwise, things can get very tedious if you have to get ? exactly
    right here:

    char message[?] = "<some long string literal>";

    In Algol 68, here as well, there's no need to provide the length

    [] CHAR message = "<some long string literal>"

    So, why wouldn't you put the length here anyway? You keep saying it's no problem at all as you always know the length!

    Or maybe in this case it /is/ a little too much work (Unicode plus
    character encoding make the length ambiguous anyway).

    Most scripting languages can deal with strings, and those can be large,
    eg. Python:

    a = "A" * 100_000_000
    print (len(a+a)) # 200000000

    I assume they can include binary data including embedded zeros.

    If A68G can't do that, then it's a QoI issue.

    Have you tried? - You can do, similar to the syntax above (in Algol 68)

    STRING s = "A" * 1 000 000;
    print (UPB (s+s))

    As I've mentioned before (in another post) you may not expect arbitrary
    sizes with the Genie interpreter. (A size of 10^8 wasn't possible in my standard configuration/setting.) But functionally it's possible.

    So, a QoI issue with that product. I just tried two scripting languages
    and creating one-billion-character strings was no problem at all.


    But your example leaves me (yet again) with the impression that you are
    just desperately seeking some detail, some feature, that Algol 68 does
    not support, just to make the point that Algol 68 would be inferior to
    this or that language. With a bit open-mindedness you can easily see - despite Algol 68 being an almost dead dinosaur - how clever its design
    and how powerful its features are, how readable the code and reliable.

    It is disappointing, that a language that blew my mind when I first encountered it (remember I'd mostly used Fortran!) is now revealed to be
    so lacking.

    It is ten times as complicated as it needs to be for use for everyday
    tasks. It has lots of semi-esoteric features, of doubtful utility, but
    which likely affect its general usefulness.

    And it looks dreadful with most stropping schemes. Quite unlike all
    those nicely typeset examples!


    I'd have liked to see such sophistication in many of the later designed languages (that partly were, to my honest astonishment, often so badly timbered).

    Clearly its aesthetics appeal to you (and maybe the fact that few
    ordinary people can understand the programs you can write in it).

    I would found it useless for the stuff I do (eg. implementing very fast interpreters that need to use unsafe, underhand methods), even if there
    was a properly compiled version available.

    (I believe there was an Algol68 front end for gcc released earlier this
    year; I haven't looked at it. See https://gcc.gnu.org/wiki/Algol68FrontEnd)
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Wed Nov 5 23:59:44 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 14:57, bart wrote:
    On 04/11/2025 00:35, I wrote:
    I don't know what causes you to think it an "academic" language --
    The nature of the RR suggests that very strongly. It also does give
    the impression that the language is perfect! Since it is so
    meticulously designed, the slightest change would break it.

    The nature of the formal definition of a language has almost
    nothing to do with what the language is designed to be used for. In
    a previous article I gave a list of actual, confirmed uses of A68 in
    all sorts of scenarios that were nothing to do with "academic" usage.

    As for perfection and meticulousness, you clearly missed the
    lively debate on the faults and iniquities of A68, both original and
    revised that took place in Algol Bulletin, CompJ, JACM [etc], and at
    a number of conferences. No-one who was around at the time would
    have recognised your description.

    [...]
    Another aspect, with A68G at least, is that there are lots of cryptic
    error messages which uses nomenclature from the Report. For example: > a68: syntax error: 1: construct beginning with a serial-clause starting
    in line 1 followed by "." and>  then a formula, an enquiry-clause starting in line 2 is not a valid
    serial-clause.

    The important bit there is "syntax error". By definition, that
    means that the compiler has been unable to parse what you wrote. The
    rest is an attempt to tell you what the compiler has found. I find it
    hard to imagine that you can read any textbook on Algol 68 that doesn't
    explain "serial clause" [etc]. It would be a lot more cryptic if it did
    not use the standard terms [or "nomenclature" if you insist].
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Mendelssohn
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 00:39:32 2025
    From Newsgroup: comp.lang.misc

    On 04/11/2025 20:04, David Brown wrote:
    On 04/11/2025 20:30, bart wrote:

    That would be an interesting discussion, as to why you think the
    provenance or history of a language, and of its implementation,
    somehow invalidates comparisons of their features, performance, and
    general utility.


    One aspect of this that I see (I can't speak for Janis, of course) is
    that widespread languages have to handle a wide range of users and use- cases.  Personalised languages are only used by one person, and for a
    small range of tasks.

    The thing about coding for consumer PCs in the 1980s, especially running
    under a simple OS that provided very little (a file system), is that you
    were responsible for virtually all the software running on the machine
    when somebody was using your application.

    Such as all the libraries and most of the drivers for example. On my GUI
    apps, I was literally responsible for every single pixel on the screen.

    Earlier on I was also working directly with bare hardware (eg. FDCs and UARTS). Plus of course all language tools, such as custom assemblers for
    the various new CPUs and microcontrollers I had to work with.

    So actually, my /in-house/ systems language covered a HUGE range of such tasks. Pretty much anything C could do, and a few things more.

    The big difference between my language and one like C, is that mine had
    only one target at a time, and was solely for in-house use. So yes a lot
    of corners could be cut.

    But that means it could also be streamlined for our needs.


      So you can easily be blinded by thinking only in
    terms of what /you/ would write in your language, not what other people might write.

    I didn't care then what other people could write. (My boss was tolerant
    of what I did, and loved the results I got. He viewed it as our secret weapon.)


    For example, I could say that C's type syntax is clear and obvious -
    because whenever I write C code, the type syntax /is/ clear and obvious.
     But that would be ignoring the possibility that someone else would
    write "* * int (*)(int (*int)" as a type.  For /your/ language, you /
    can/ ignore the possibility that someone will write something horrible, because you are the only one writing in it, and you don't write horrible code (I assume!).  Comparisons are thus between the best of your
    language, and the worst of other languages (whether it be C, Algol, or anything else).

    Then there is the "battle-tested" aspect.  While I realise you wrote real-world code in your languages, they are not "battle-tested" in the manner of widespread languages - again, because you are "nice" to your language and tools.

    This is one of the corners I can cut. It's a QoI thing; I can work
    around an omission or bug. That is much less acceptable for a general tool.

    Later on however I did produce scripting languages for others to use.


    We can see this in particular when modifying the language.  If you want
    to add support for 24-bit integers, you can hack on a "tribyte" keyword
    and type fairly quickly by adding it to the source code of your
    compiler.

    In a mainstream language, such a change needs serious
    consideration about how it fits with the language, any conflicts with existing code

    Whatever the excuses, the fact is that I /can/ fix my language and
    evolve it more easily. Then it becomes a sweeter product to use.

    People create DSLs for the various benefits they provide. It's the same
    thing.

    (that could be millions of files), conflicts or
    ambiguities with existing language constructs and syntax, how it could
    work on multiple different types of target with different sized words,

    I think only C is bothered about that.

    Most other seem to assume 8/16/32/64-bit architectures (Rust, Java, C#,
    D, Zig, Go...).

    (Actually, I don't believe your 24-bit type should be implemented via
    the type system. I prefer to have bitfields and bitfield operations
    instead. Otherwise it's quite a large can of worms.)

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 01:03:57 2025
    From Newsgroup: comp.lang.misc

    On 05/11/2025 23:59, Andy Walker wrote:
    On 04/11/2025 14:57, bart wrote:

    Another aspect, with A68G at least, is that there are lots of cryptic
    error messages which uses nomenclature from the Report. For example: >
    a68: syntax error: 1: construct beginning with a serial-clause starting
    in line 1 followed by "." and>   then a formula, an enquiry-clause
    starting in line 2 is not a valid
    serial-clause.

        The important bit there is "syntax error".

    I just pick up on 'error'! Then I have to try a different combination of tokens until works.



    By definition, that
    means that the compiler has been unable to parse what you wrote.  The
    rest is an attempt to tell you what the compiler has found.  I find it
    hard to imagine that you can read any textbook on Algol 68 that doesn't explain "serial clause" [etc].  It would be a lot more cryptic if it did
    not use the standard terms [or "nomenclature" if you insist].



    Sorry, but the error messages really are poor. If I call a function
    taking one argument, but I forget to provide it, then it says:

    a68: error: 1: PROC (INT) INT cannot be coerced to [] "SIMPLOUT" in a strong-argument (detected in particular-program).

    How about: 'missing argument' or something along those lines; would that really be more cryptic?










    Ho

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Thu Nov 6 07:40:35 2025
    From Newsgroup: comp.lang.misc

    On 06.11.2025 02:03, bart wrote:
    On 05/11/2025 23:59, Andy Walker wrote:

    By definition, that
    means that the compiler has been unable to parse what you wrote. The
    rest is an attempt to tell you what the compiler has found. I find it
    hard to imagine that you can read any textbook on Algol 68 that doesn't
    explain "serial clause" [etc]. It would be a lot more cryptic if it did
    not use the standard terms [or "nomenclature" if you insist].

    Sorry, but the error messages really are poor. If I call a function
    taking one argument, but I forget to provide it, then it says:

    a68: error: 1: PROC (INT) INT cannot be coerced to [] "SIMPLOUT" in a strong-argument (detected in particular-program).

    How about: 'missing argument' or something along those lines; would that really be more cryptic?

    Standalone 'missing argument' is to me clearer, but the presented error
    message seems to me to express something completely different than that,
    so I suppose you cannot compare it. (But without seeing the actual code
    sample in this post it's pointless to speculate. I certainly cannot
    reproduce the error with code like you pretend. The "SIMPLOUT" seem to
    indicate more the use of, maybe, a standard transput output function
    that isn't used correctly with respect of the provided parameters. It
    seems to try coercing what you wrongly provided into what's expected.)

    That said; personally I'd also appreciated messages that are closer to
    the "programmer's language" than to the "language designer's language".

    I don't recall that the Algol 68 compiler we had used on the TR440 back
    in my university days had messages like the ones from Genie. My faint
    memories seem to remember "better understandable" messages, information
    that could be understood without the Algol 68 standard's terms (that
    back these days I didn't know).

    My feelings about that are thus ambivalent; for one I think diagnostic
    messages could maybe have been made better readable in Genie. Though I
    also have [recently] acquired knowledge of the standard terms and got
    also used to the common types of errors, so I personally see no actual
    problem. And given that Algol 68 generally (and Genie specifically) is practically not [widely] used any more I see no point in a fundamental
    change of that in Genie. Also its consistently used standard terms is
    basically a "pro" (compared to individual ad hoc wording). And given
    that you personally also aren't interested using Algol 68 and Genie,
    but are interested mainly in complaining about "everything" [that you
    haven't written yourself], any change here wouldn't serve you anyway.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Thu Nov 6 08:29:38 2025
    From Newsgroup: comp.lang.misc

    On 05.11.2025 15:28, bart wrote:
    On 05/11/2025 11:25, Janis Papanagnou wrote:
    On 04.11.2025 13:24, bart wrote:

    This is simply wrong. If a language (not A68, but using its syntax)
    REQUIRES you to write this:

    [n]INT a = (x1, x2, x3, .... xn)

    That is, the 'n' has to exactly match the count of items, then that is
    very poor. There are several issues

    Then just don't write it (that 'n') (in Algol 68)

    [] INT a = (x1, x2, x3, ..., xn)

    You seem to have missed a couple of things:

    (1) This is not about Algol68

    No, I read what you wrote. But since your original complaints were
    in principal form about Algol 68 I see no problem discussing your
    problems based on that paragon, instead of mixing argumentation.

    (I'm curious why you switched the goalpost, in the first place.
    My suspicion was that you just said that to not be confronted with
    the sensible support in and language definition of Algol 68.)

    (2) This is specifically where a language needs those bounds up-front

    You don't "need" bounds. - That actually depends on the language!


    Becase you stated there you saw no problem in discovering and having to include those bounds.

    That still holds.


    Since I've given some examples of where that would be awkward or
    impossible, and haven't convinced you, I won't bother any further.

    (You regularly ignore counter-arguments that prove you wrong.)


    It could been read from an external file.

    Then you would not have the static initializer-lists that were part
    of all examples you depicted. (You seem to be switching goalposts.)

    That could have been generated from a process which is
    part of a build-script (LD'O's suggestion), then you will not know what
    it will be before you start to build.

    Yes. - And I'm thinking about what I'd do, say, in "C" (or Algol 68).
    Since we have no flexible and dynamically extensible constructs here
    we need some more clever approach. If data comes from outside context
    you need means to provide that information; the generator might count
    and provide the information with the data he generates, or, if not,
    an additional preprocessing (like wc -w) could be inserted to provide
    the necessary information, or read in the data (as it comes, as text)
    into a string and have the application count the semantic elements
    before they get stored in the typed array.

    How would you, in "C" (or Algol 68), get information of dynamic size
    read into static structures? - realloc() on each element? realloc()
    on chunks of data? Fixed size arrays of abnormal length 'int a[10^8]'
    (that may still fail in yet more pathological cases)?

    I don't understand what you're saying. An example in C might look like
    this:

    char data[] = {
    #include "file1" // both contain comma-delimited sequences
    #include "file2"
    };

    This would be static data object. It is vastly more convenient to have
    those bounds unspecified.

    I expect we're talking at cross-purposes.

    Yes, probably.

    (The #include hacks you've shown above would not be an instance of
    reliable software design in my book. YMMV. And irrelevant for the
    Algol 68 case and your original complaints on that.)



    There some instances where you do need a count (for example it has to
    match something else in the program) so you can /optionally/ supply it,
    and the compiler can report a mismatch if the item count is wrong.

    Otherwise, things can get very tedious if you have to get ? exactly
    right here:

    char message[?] = "<some long string literal>";

    In Algol 68, here as well, there's no need to provide the length

    [] CHAR message = "<some long string literal>"

    So, why wouldn't you put the length here anyway?

    (As I demonstrated, I wouldn't use an array but a string type; in
    Algol 68 or in any other language - most languages support strings.)

    You keep saying it's no
    problem at all as you always know the length!

    There's a couple [meta-]problems here; you obviously don't know (in
    the sense of understanding") the language, and generally ignore the explanations.

    Your original complaints have been about (mind the ':=')
    [] INT var := ( ... );
    needing a size, and I explained why that is the case and showed the
    many problems and deficiencies your thinking had here, and I showed
    you and explained to you the appropriate and sensible definition.


    Or maybe in this case it /is/ a little too much work (Unicode plus
    character encoding make the length ambiguous anyway).

    (What I had explained to you had nothing to do with Unicode.)



    But your example leaves me (yet again) with the impression that you are
    just desperately seeking some detail, some feature, that Algol 68 does
    not support, just to make the point that Algol 68 would be inferior to
    this or that language. With a bit open-mindedness you can easily see -
    despite Algol 68 being an almost dead dinosaur - how clever its design
    and how powerful its features are, how readable the code and reliable.

    It is disappointing, that a language that blew my mind when I first encountered it (remember I'd mostly used Fortran!) is now revealed to be
    so lacking.

    It is ten times as complicated as it needs to be for use for everyday
    tasks.

    It's one of the most coherent languages I've seen over the past
    decades. It has an orthogonal design. That and other things makes
    it _easy_ to understand and use, *not* complex. There's many much
    more *primitive* (widely used) languages that *are* complex, though.

    Supported by the "problems" you report here and obviously have with
    Algol 68 I can just guess that the problem is not the language here.


    It has lots of semi-esoteric features, of doubtful utility, but
    which likely affect its general usefulness.

    (Bla, bla. - Nonsense.)


    And it looks dreadful with most stropping schemes. Quite unlike all
    those nicely typeset examples!

    You said before that you don't like stropping in principle. This
    just reinforces what someone here said before, that "most of your
    objections are merely your preferences".


    I'd have liked to see such sophistication in many of the later designed
    languages (that partly were, to my honest astonishment, often so badly
    timbered).

    Clearly its aesthetics appeal to you (and maybe the fact that few
    ordinary people can understand the programs you can write in it).

    All the students back in my university days had not problem at all
    learning Algol 68 en passant and programming with it. In our domain
    we're all "ordinary people". The problem here is that your personal
    mental reluctance to learn and understand concepts beyond your own
    preferences seems to be a severe hindrance.


    I would found it useless for the stuff I do (eg. implementing very fast interpreters that need to use unsafe, underhand methods), even if there
    was a properly compiled version available.

    Fair enough. (I don't think anyone would object to that.)


    (I believe there was an Algol68 front end for gcc released earlier this
    year; I haven't looked at it. See https://gcc.gnu.org/wiki/Algol68FrontEnd)

    I've already heard about it but I have no need for another Algol 68
    system, since I'm anyway using it only recreationally. But thanks.
    Maybe others are interested (but I doubt it; who cares about a dead
    language).

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 10:59:16 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 06:40, Janis Papanagnou wrote:
    On 06.11.2025 02:03, bart wrote:
    On 05/11/2025 23:59, Andy Walker wrote:

    By definition, that
    means that the compiler has been unable to parse what you wrote. The
    rest is an attempt to tell you what the compiler has found. I find it
    hard to imagine that you can read any textbook on Algol 68 that doesn't
    explain "serial clause" [etc]. It would be a lot more cryptic if it did >>> not use the standard terms [or "nomenclature" if you insist].

    Sorry, but the error messages really are poor. If I call a function
    taking one argument, but I forget to provide it, then it says:

    a68: error: 1: PROC (INT) INT cannot be coerced to [] "SIMPLOUT" in a
    strong-argument (detected in particular-program).

    How about: 'missing argument' or something along those lines; would that
    really be more cryptic?

    Standalone 'missing argument' is to me clearer, but the presented error message seems to me to express something completely different than that,
    so I suppose you cannot compare it. (But without seeing the actual code sample in this post it's pointless to speculate.

    PROC fred = (INT a)INT: 1234;
    print(fred())


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 14:18:48 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 07:29, Janis Papanagnou wrote:
    On 05.11.2025 15:28, bart wrote:

    It is ten times as complicated as it needs to be for use for everyday
    tasks.

    It's one of the most coherent languages I've seen over the past
    decades. It has an orthogonal design. That and other things makes
    it _easy_ to understand and use, *not* complex.

    You really can't see it? Read through that Revised Report, which has
    invented its own language for describing Algol68, and try and tell me
    how that isn't completely over the top.

    As for being orthognal, look at this set of function calls:

    f(a, b); # 2 args
    f(a); # 1 arg
    f; # 0 args

    Notice no parentheses on the last. Same goes for the declarations in
    each case.

    Or this:

    INT a, b, c;
    BITS x, y z;

    a := b + c;
    x := y XOR c;

    Those last two lines are fine, but these are not:

    a := b XOR c;
    x := y + z;
    a := y + c;

    Or this:

    BEGIN
    a := 1;
    b := 2;
    c := 3
    END

    Each line ends with a semicolon - except the last in a block. Yes I
    understand the rule, but it means that because the last line is a
    special case, you spend a lot of time dealing with it.

    You can't temporarily comment out the last line, or temporarily add a
    new last line, or move it elsewhere, or do any of usual stuff that comes
    up in development, without reworking those semicolons.

    The same applies to function definitions too. It is just a damned nuisance.

    All these could actually have been an easy fix if the language wasn't so
    far up its own arse.

    Supported by the "problems" you report here and obviously have with
    Algol 68 I can just guess that the problem is not the language here.

    I'm sure the language 'works', if you ignore the things that are needed
    or desirable for a practical language.

    But, when coding I don't want to spend 90% of my time fighting the
    language /and/ implementation,




    It has lots of semi-esoteric features, of doubtful utility, but
    which likely affect its general usefulness.

    (Bla, bla. - Nonsense.)

    OK, so you actually know for certain that all those high-falutin'
    features don't affect the quality and efficiency of its implementation,
    the difficulty of optimising it, and they don't compromise user-facing
    aspects such as syntax and ergonomics.



    And it looks dreadful with most stropping schemes. Quite unlike all
    those nicely typeset examples!

    You said before that you don't like stropping in principle. This
    just reinforces what someone here said before, that "most of your
    objections are merely your preferences".

    Nobody likes stropping otherwise many more languages would look like
    Algol68. They decided that spaces within identifiers, the main
    advantage, are just not worth the trouble.

    I actually sometimes use stropping within my own projects, but it will
    either be for machine-generated content, or only rarely in user-code:

    `exit()

    This calls C's exit() function. Without the backtick, 'exit' is a
    reserved word in my syntax.

    I've just noticed another peculiarity of Algol68 (may be specific to A68G):

    * Spaces are allowed in indentifiers, but they are not significant,
    so that 'ab c' and 'a b c' are the same name.

    * Identifiers must be lower case (I'd always thought it was case-
    insensitive)

    * Spaces are also ignored here: INTabc;

    * But here: 'LONG INTabc def;'; 'LONG INT' are two tokens, but 'abc def'
    are one token.

    How can something so straightforward get so complicated!




    I'd have liked to see such sophistication in many of the later designed
    languages (that partly were, to my honest astonishment, often so badly
    timbered).

    Clearly its aesthetics appeal to you (and maybe the fact that few
    ordinary people can understand the programs you can write in it).

    All the students back in my university days had not problem at all
    learning Algol 68 en passant and programming with it. In our domain
    we're all "ordinary people". The problem here is that your personal
    mental reluctance to learn and understand concepts beyond your own preferences seems to be a severe hindrance.

    Yes, I'm generally lazy. I have little patience. I have a bad memory.
    I'm a hopeless typist. And my eyes glaze over when I look at a block of mixed-case source code that likes like MIME-encoded binary.

    So I like a language syntax that makes my life easier. Syntax is one of
    the easiest things you can get right in a language.


    The concepts here are not as advanced or polished as they are in a
    language like Haskell. It looks likes a regular imperative language but
    it has that intimidatingly complex RR behind it.

    I'm not surprised that Wirth got fed up with it and left the project to develop Pascal. That language really did have some innovative features.

    It would have been far easier to tweak to a much more practical
    language, as it didn't have those 100s of pages of gobbleygook from the
    RR to have to deal with too.



    I would found it useless for the stuff I do (eg. implementing very fast
    interpreters that need to use unsafe, underhand methods), even if there
    was a properly compiled version available.

    Fair enough. (I don't think anyone would object to that.)


    (I believe there was an Algol68 front end for gcc released earlier this
    year; I haven't looked at it. See https://gcc.gnu.org/wiki/Algol68FrontEnd)

    I've already heard about it but I have no need for another Algol 68
    system, since I'm anyway using it only recreationally. But thanks.
    Maybe others are interested (but I doubt it; who cares about a dead language).

    Janis


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 15:58:46 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 14:18, bart wrote:
    On 06/11/2025 07:29, Janis Papanagnou wrote:

    The concepts here are not as advanced or polished as they are in a
    language like Haskell. It looks likes a regular imperative language but
    it has that intimidatingly complex RR behind it.

    I'm not surprised that Wirth got fed up with it and left the project to develop Pascal. That language really did have some innovative features.

    I wrote this but had decided not to post it. But I forgot it was lurking
    out of sight.

    But since I have, here is a quote on the topic from https://cacm.acm.org/blogcacm/niklaus-wirth-or-the-importance-of-being-simple/ :

    "Wirth recognized Algol 68 for what it was, a catastrophe. (An example
    of how misguided the design was: Algol 68 promoted the concept of orthogonality, roughly stating that any two language mechanisms could be combined. Very elegant in principle, and perhaps appealing to some mathematicians, but suicidal: to make everything work with everything,
    you have to complicate the compiler to unbelievable extremes, whereas
    many of these combinations are of no use whatsoever to any programmer!)"

    (This is what I tried to express, badly.)


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Brown@[email protected] to comp.lang.misc on Thu Nov 6 17:14:13 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 15:18, bart wrote:
    On 06/11/2025 07:29, Janis Papanagnou wrote:
    On 05.11.2025 15:28, bart wrote:

    It is ten times as complicated as it needs to be for use for everyday
    tasks.

    It's one of the most coherent languages I've seen over the past
    decades. It has an orthogonal design. That and other things makes
    it _easy_ to understand and use, *not* complex.

    You really can't see it? Read through that Revised Report, which has invented its own language for describing Algol68, and try and tell me
    how that isn't completely over the top.

    As for being orthognal, look at this set of function calls:

      f(a, b);      # 2 args
      f(a);         # 1 arg
      f;            # 0 args

    Notice no parentheses on the last. Same goes for the declarations in
    each case.

    Or this:

       INT a, b, c;
       BITS x, y z;

       a := b + c;
       x := y XOR c;

    Those last two lines are fine, but these are not:

       a := b XOR c;
       x := y + z;
       a := y + c;


    I don't know Algol, but if it distinguishes between types that can have bitwise logic operations and types that have arithmetic operations, then
    I approve of that. These are separate concepts, and should use
    different types. (IMHO, of course.)

    Or this:

      BEGIN
         a := 1;
         b := 2;
         c := 3
      END

    Each line ends with a semicolon - except the last in a block. Yes I understand the rule, but it means that because the last line is a
    special case, you spend a lot of time dealing with it.


    I can see that being a nuisance. It's fine to say semicolons are
    statement separators, but it would then be convenient if an empty
    statement is allowed.

    You can't temporarily comment out the last line, or temporarily add a
    new last line, or move it elsewhere, or do any of usual stuff that comes
    up in development, without reworking those semicolons.

    And it looks dreadful with most stropping schemes. Quite unlike all
    those nicely typeset examples!

    You said before that you don't like stropping in principle. This
    just reinforces what someone here said before, that "most of your
    objections are merely your preferences".

    Nobody likes stropping otherwise many more languages would look like Algol68. They decided that spaces within identifiers, the main
    advantage, are just not worth the trouble.


    I agree with you here - stropping is not pleasant. It makes code harder
    to read and harder to write. It's better for a language to minimise the number of keywords it has (or have some kind of "contextual keyword"
    scheme, but these can get complicated), and have namespaces so that you
    don't crowd out the global or unqualified namespace.

    I actually sometimes use stropping within my own projects, but it will either be for machine-generated content, or only rarely in user-code:

       `exit()

    This calls C's exit() function. Without the backtick, 'exit' is a
    reserved word in my syntax.

    I've just noticed another peculiarity of Algol68 (may be specific to A68G):

    * Spaces are allowed in indentifiers, but they are not significant,
      so that 'ab c' and 'a b c' are the same name.

    * Identifiers must be lower case (I'd always thought it was case-
      insensitive)

    * Spaces are also ignored here: INTabc;

    * But here: 'LONG INTabc def;'; 'LONG INT' are two tokens, but 'abc def'
      are one token.

    How can something so straightforward get so complicated!


    I'm sure you'd love metafont and metapost, where something that looks
    like a variable "x1" is actually element 1 of x (whether it is an array,
    a tuple, or similar). You can't have digits in identifiers IIRC.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Thu Nov 6 16:59:19 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 01:03, bart wrote:
    [I wrote:]
         The important bit there is "syntax error".
    I just pick up on 'error'! Then I have to try a different combination
    of tokens until works.

    Somehow, I'm not surprised. Anything rather than learn the
    syntax and semantics of the language you're using.

    [...] If I call a function taking one argument, but I forget to provide
    it, then it says:
     a68: error: 1: PROC (INT) INT cannot be coerced to [] "SIMPLOUT" in
    a strong-argument (detected in particular-program).
    How about: 'missing argument' or something along those lines; would
    that really be more cryptic?

    It wouldn't be more cryptic, but as there isn't necessarily a
    missing argument it would be wrong. I could supply a more accurate
    error message, but as you stop reading at "error" there's no point.
    [Note that in A68G, to use your own example from a later article,
    "fred()" is not directly an error.]
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Lysberg
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 17:58:42 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 16:59, Andy Walker wrote:
    On 06/11/2025 01:03, bart wrote:
    [I wrote:]
         The important bit there is "syntax error".
    I just pick up on 'error'! Then I have to try a different combination
    of tokens until works.

        Somehow, I'm not surprised.  Anything rather than learn the
    syntax and semantics of the language you're using.

    I don't use it often enough for that, but even then, I wouldn't want to
    invest so much effort into something I view as hopelessly overcomplicated.

    I wonder if anyone has ever thought of producing a 'cheatsheet' which summarises the essentials on one or two pages?


    [...] If I call a function taking one argument, but I forget to provide
    it, then it says:
      a68: error: 1: PROC (INT) INT cannot be coerced to [] "SIMPLOUT" in
    a strong-argument (detected in particular-program).
    How about: 'missing argument' or something along those lines; would
    that really be more cryptic?

        It wouldn't be more cryptic, but as there isn't necessarily a missing argument it would be wrong.  I could supply a more accurate
    error message, but as you stop reading at "error" there's no point.
    [Note that in A68G, to use your own example from a later article,
    "fred()" is not directly an error.]


    Here is that example:

    PROC fred = (INT a)INT: 1234;
    print(fred())

    (BTW it takes a parameter because I couldn't figure out how to write an
    empty parameter list. I eventually hit on the right combination, but
    just allowing () would have helped. I would love to see the bit in the language reference that explains this point.)

    Anyway why wouldn't it be an error?

    (In my take on it, where the nearest equivalent is written as 'fun
    fred(int a)int = 1234', then calling it with fred() results in:

    Parameter 1 not optional

    This is because trailing arguments can be omitted if they have default values.)
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Thu Nov 6 19:41:39 2025
    From Newsgroup: comp.lang.misc

    On 06.11.2025 17:14, David Brown wrote:
    On 06/11/2025 15:18, bart wrote:
    On 06/11/2025 07:29, Janis Papanagnou wrote:
    On 05.11.2025 15:28, bart wrote:

    It is ten times as complicated as it needs to be for use for everyday
    tasks.

    It's one of the most coherent languages I've seen over the past
    decades. It has an orthogonal design. That and other things makes
    it _easy_ to understand and use, *not* complex.

    You really can't see it? Read through that Revised Report, which has
    invented its own language for describing Algol68, and try and tell me
    how that isn't completely over the top.

    The Algol 68 standard document is complex. But we were not speaking
    about a standard but about the language. The Algol 68 language isn't
    complex; certainly powerful, certainly huge, but the concepts are
    clean and comparably easy.

    You don't need to read the Revised Report to program in Algol 68.
    (Myself I've never read any language standard to _learn_ it; I do
    actually think this would be a stupid idea to do, unless you want
    to implement that language - as opposes to just programming in that
    language.)

    By "own language for describing Algol68" I assume you mean the
    (2-level) van Wijngaarden grammar? - There's a reason for that;
    one aspect of its invention was to formally describe parts of the
    language that were before (and after) only defined in non-formal
    natural language. Other languages had formal specifications with
    non-formal parts where here a lot of syntax and semantics are
    formalized.

    I understand that if you want to write your "own Algol language"
    you'd curse the Revised Report (as you already do), but as an
    Algol 68 programmer just ignore it; get a textbook and off we go.


    As for being orthognal, look at this set of function calls:

    Maybe you should inspect the literature on that term. You may
    take just the introduction of the Revised Report (which, see
    above, thus far isn't difficult to read). I quote:

    "Orthogonal design
    The number of independent primitive concepts has been minimized
    in order that the language be easy to describe, to learn, and to
    implement. On the other hand, these concepts have been applied
    "orthogonally" in order to maximize the expressive power of the
    language while trying to avoid deleterious superfluities."

    (And if you browse through Marcel's documentation you find some
    more hints on that.)


    f(a, b); # 2 args
    f(a); # 1 arg
    f; # 0 args

    (I suspect you want to see like in "C" parenthesis scattered all
    over the place?)

    But so what?

    If you have

    REAL x = pi;

    why do you as a programmer care whether 'pi' is a constant, or a
    value stored in a variable, or a function calculating a number,
    or access to a device that provides that number, or whatever.

    And that syntax is not different from other languages; see Pascal,
    Simula, Eiffel, just to name a few off the top of my head.

    I'm aware that your personal interest as a language writer is to
    know whether it is a function. (BASIC's 'A$' comes to mind to see
    everywhere that 'A' contains a string. Or Perl's tags maybe?)

    I'm not interested to see technical details; I want to focus on
    the _problem domain_!


    Notice no parentheses on the last. Same goes for the declarations in
    each case.

    What "same" - there's no parenthesis here.

    Or this:

    INT a, b, c;
    BITS x, y z;

    a := b + c;
    x := y XOR c;

    Those last two lines are fine, but these are not:

    a := b XOR c;
    x := y + z;
    a := y + c;

    I'm astonished that you pretend to don't know type systems, and
    operators and functions defined on objects of types.

    What semantics do you think should "INT xor INT" have, or "BITS
    + BITS" ?! - My only guess here is that you have again the "C"
    language in mind that doesn't care here - where all are actually
    just integers; where there's no 'bits' and [historically] no
    'bool' type or values.



    I don't know Algol, but if it distinguishes between types that can have bitwise logic operations and types that have arithmetic operations, then
    I approve of that. These are separate concepts, and should use
    different types. (IMHO, of course.)

    Of course, and obvious. - Though not for bart!

    If bart wants some functionality that a language doesn't provide
    for whatever reason - but mainly for the reason that developers
    didn't know bart's personal preferences! - then, in Algol 68, he
    could even just _define_ that operator!

    OP XOR = (INT a, b) INT : ...

    Which language back then (or even nowadays) allows that?! - Not
    too many.


    Or this:

    BEGIN
    a := 1;
    b := 2;
    c := 3
    END

    Each line ends with a semicolon - except the last in a block.

    No, that's wrong. It's neither a "line end" nor a "command end"
    or anything like that; it is sequencing the expressions, or if
    that's easier to understand, assume it as "command delimiter".

    But keep in mind that there's not only the sequentializing but
    also the collateral separator. (That's my words, not standard
    terminology.)

    Yes I understand the rule,

    No, obviously you don't. Conceptually you don't come even close.

    but it means that because the last line is a special case,

    (See, you didn't get it.)

    you spend a lot of time dealing with it.

    Nope. (First of all *you* have issues.)



    I can see that being a nuisance. It's fine to say semicolons are
    statement separators, but it would then be convenient if an empty
    statement is allowed.

    Yes, some languages (like Pascal) have defined an empty statement.

    In Algol 68 you may use SKIP as empty statement (where necessary,
    which is rare). One example from a piece of code

    FOR turn WHILE play_turn (turn) DO
    SKIP
    OD

    Personally I have no issues with *not* having to write the semicolon
    after every command. Sometimes, because of Algol's syntax, there's
    just no semicolons necessary at all. Another example from the same
    piece of code as above

    PROC play_turn = (INT turn) BOOL :
    BEGIN
    IF strokes_mode THEN
    printf ((...))
    ELSE
    printf ((...))
    FI;
    player [turn MOD 2]
    END

    Very few semicolons (just one), where in, say "C", you'd not only
    need semicolons at each command but also have all these parenthesis
    and braces littering all the code.


    You can't temporarily comment out the last line, or temporarily add a
    new last line, or move it elsewhere, or do any of usual stuff that
    comes up in development, without reworking those semicolons.

    What is "reworking" for you is an easy task for folks who can use
    their (hopefully powerful) editor and think a bit when doing such
    tasks. (I'm sure some people that feel a bit uncomfortable with
    that. But bart, as so often, is making a drama from that!)

    (Note: I didn't expanded here on actual reasons and rationales for
    such syntax decision. Interested people can look that up.)


    And it looks dreadful with most stropping schemes. Quite unlike all
    those nicely typeset examples!

    You said before that you don't like stropping in principle. This
    just reinforces what someone here said before, that "most of your
    objections are merely your preferences".

    Nobody likes stropping otherwise many more languages would look like
    Algol68. They decided that spaces within identifiers, the main
    advantage, are just not worth the trouble.


    I agree with you here - stropping is not pleasant. It makes code harder
    to read and harder to write.

    There's (for historic reasons) actually various forms of stropping.
    Back in university days we had dot-stropping, prepending a '.' to
    the respective language elements, like ".INT A := PI". Another one
    was (IIRC) quote-stropping, like "'INT' A := PI". And Genie uses
    all-caps, like "INT a := pi". The former two are indeed harder to
    read; needless to say I didn't like the dot-stropping. But the way
    it's done in Genie with all caps is very good readable! And the
    respective key elements stand out and even help with readability
    (if compared with all lowercase or all uppercase layouts). Having
    an editor with syntax highlighting can of course be a substitute
    for that to some degree. Re "harder to type"; not for me at least.

    It's better for a language to minimise the number of keywords it has

    This is a related point. - And your statement to reduce the number
    of keywords makes certainly a valid point. Personally I find the
    huge number of _elements_ that Algol 68 provides not a bad thing;
    it's part of its extreme power. But you need _keywords_ for those
    elements (or other means, like in "C" or C++). This flood of names
    is, on the one hand, a bit overwhelming. On the other hand, though,
    we see where it lead in other languages that tried to reduce the
    number of keywords by making the language a battlefield of "graph"
    characters; and *that* is what I consider even worse.

    With stropping you alleviate the principal issue to a huge degree.
    (But we know that stropping, certainly not all kinds of stropping,
    are liked by everyone.)

    (or have some kind of "contextual keyword"
    scheme, but these can get complicated),

    Indeed, that would probably not only get complicated but probably
    rather make source code much less readable. (As opposed to all-caps
    stropping which even increases readability, IMO. - But I said that
    already.)

    and have namespaces so that you
    don't crowd out the global or unqualified namespace.

    Also very true. - Back then the concept of name-spaces wasn't part
    of the languages' design repertoire, I'd guess. - OTOH, with Simula
    we've got classes to encapsulate names, or other languages where
    you could use blocks or modules. - But for the language keywords
    it's of course a different thing.


    [...]

    I've just noticed another peculiarity of Algol68 (may be specific to
    A68G):

    * Spaces are allowed in indentifiers, but they are not significant,
    so that 'ab c' and 'a b c' are the same name.

    Yes. Or in numbers; 1 000 000 is the same as 1000000 or 1 00 00 00.
    You may take that to your advantage to make numbers or names of
    elements (variables, functions) better legible, by formatting it
    in semantical parts or units. (But one can also glue it together
    unreadably if one prefers.)

    In other languages programmers often _emulate_ that feature/effect
    by using underscores (as far as the language allows that).

    So in bart's example (which seems again to be meant as bad design),
    'ab c' and 'a b c', you (as a programmer) would of course not place
    the spaces arbitrarily, but put the spaces (as in other languages
    the '_') at the semantical sensible word-sections.

    And, needless to say, the compiler also warns of course in case of
    declarations like
    INT ab c = 1;
    INT a b c = 2;


    * Identifiers must be lower case (I'd always thought it was case-
    insensitive)

    Reading a textbook helps. Here as well. (But I understand that; if
    you'd spend the time to read you'd then have less time to post and
    complain.)


    * Spaces are also ignored here: INTabc;

    Obviously an effect of the two separate name spaces (cf. stropping).
    I know there's folks who like to save some bytes when writing code,
    but I suggest to format your code with spaces and tabs.


    * But here: 'LONG INTabc def;'; 'LONG INT' are two tokens, but 'abc def'
    are one token.

    You named it correctly; it's *two* _tokens_; the type INT and the size-specifier LONG. (Again my wording, not standard parlance.)

    It's basically not about spaces, it's about tokens and syntax.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@[email protected] to comp.lang.misc on Thu Nov 6 20:14:36 2025
    From Newsgroup: comp.lang.misc

    On Thu, 6 Nov 2025 17:58:42 +0000, bart wrote:

    I would love to see the bit in the language reference that explains
    this point.)

    Page 30 of the Revised Report:

    N) PROCEDURE :: procedure PARAMETY yielding MOID.
    O) PARAMETY :: with PARAMETERS ; EMPTY.
    P) PARAMETERS :: PARAMETER ; PARAMETERS PARAMETER.

    The docs are all public, you know ...
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 22:01:33 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 18:41, Janis Papanagnou wrote:
    On 06.11.2025 17:14, David Brown wrote:



    * Identifiers must be lower case (I'd always thought it was case-
    insensitive)

    Reading a textbook helps. Here as well. (But I understand that; if
    you'd spend the time to read you'd then have less time to post and
    complain.)


    FFS. Please stop with insults.

    I've spent nearly an hour replying in detail to your points above, but
    decided to delete the lot.

    Because this is clearly not going going to be a civilised, two-way
    dialogue where you respect my opinion and admit where I might have a point.

    You can't seem to resist being condescending and patronising, and can't
    seem to take the slightest bit of criticism about the language being discussed. (Anyone would think it was yours!)

    Regarding the above point, I'd be delighted to be pointed to a reference
    that states it categorically.

    But I suspect it depends on the stropping scheme used. For A68G, I had
    assumed that all-caps were reserved words, with mixed-case and lower
    case being identifiers. But mixed-case can't work if "OneTwo" is four
    tokens.


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Thu Nov 6 22:16:43 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 20:14, Lawrence D’Oliveiro wrote:
    On Thu, 6 Nov 2025 17:58:42 +0000, bart wrote:

    I would love to see the bit in the language reference that explains
    this point.)

    Page 30 of the Revised Report:

    N) PROCEDURE :: procedure PARAMETY yielding MOID.
    O) PARAMETY :: with PARAMETERS ; EMPTY.
    P) PARAMETERS :: PARAMETER ; PARAMETERS PARAMETER.

    Yeah, that clears things up...

    The docs are all public, you know ...

    I was actually mistaken. It appears to work like this:

    * If F is declared with an empty parameter list "()", then it can be
    called using F() or just F

    * But if declared with no parameter list, it has to be called as just F.

    In the latter case, writing F() appears to cause it to apply () to F's
    return value. This would have the consequence that given:

    F();

    you don't know if that's a normal single function call, or a double one
    (call F, then call what F returns).

    It's also not clear if, when F does in fact return a function, whether:

    F;

    will automatically do a double call.

    (These are observations; people don't need to answer.)
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@[email protected] to comp.lang.misc on Thu Nov 6 22:47:31 2025
    From Newsgroup: comp.lang.misc

    On Thu, 6 Nov 2025 22:16:43 +0000, bart wrote:

    * But if declared with no parameter list, it has to be called as just F.

    This is all down to Algol 68’s system of “coercions”. An implicit call to
    a routine like this is called “deproceduring”. Obviously it only happens if the expected type at that context is not the routine type itself, but
    the routine result type.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Fri Nov 7 14:34:50 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 17:58, bart wrote:
    I wonder if anyone has ever thought of producing a 'cheatsheet' which summarises the essentials on one or two pages?

    Both the A68-R "User's Guide" and the Watt-Peck-Sintzoff one-page syntax chart have been referred to here within the past few weeks.

    Here is that example:
     PROC fred = (INT a)INT: 1234;
     print(fred())
    (BTW it takes a parameter because I couldn't figure out how to write an
    empty parameter list.

    You couldn't figure out that to write an empty list you write absolutely nothing, as in Algol 60, Pascal, ...? [C was the first language
    I used, several years after A68, where you had to provide the "()" even for
    a parameterless procedure.]

    [...] Anyway why wouldn't it be an error?

    Your code /is/ in error, but the error is not necessarily in
    "fred()" [though it would be in pure A68 compilers, or indeed in A68G
    prior to mark 1.7.0]. See the "NEWS" file in your A68G source tree.
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Hertel
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Fri Nov 7 15:42:26 2025
    From Newsgroup: comp.lang.misc

    On 07/11/2025 14:34, Andy Walker wrote:
    On 06/11/2025 17:58, bart wrote:
    I wonder if anyone has ever thought of producing a 'cheatsheet' which
    summarises the essentials on one or two pages?

        Both the A68-R "User's Guide" and the Watt-Peck-Sintzoff one-page syntax chart have been referred to here within the past few weeks.

    Here is that example:
      PROC fred = (INT a)INT: 1234;
      print(fred())
    (BTW it takes a parameter because I couldn't figure out how to write an
    empty parameter list.

        You couldn't figure out that to write an empty list you write absolutely nothing, as in Algol 60, Pascal, ...?

    I almost certainly tried that, and it probably gave errors for other
    reasons. For example, this fails:

    PROC main = VOID: print("hello");
    main()

    with:

    a68: syntax error: 1: VOID construct must yield a routine, row or structured value (detected in parti
    cular-program).

    So then you try something else. I didn't know then that that main() was
    at fault. Yet, this works (or worked when I posted about what seemed to
    be the rules for ()):

    PROC main = ()VOID: print("hello");
    main()

    I tried it just now, and it doesn't work with either 'main' or 'main()':

    a68: syntax error: 1: possibly a missing or erroneous symbol nearby.
    a68: syntax error: 2: possibly a missing or erroneous separator nearby.

    However yesterdays' test had a function that returned a value, like this:

    PROC main = ()INT: (print("hello"); 0);
    main()

    Now, that works, and it works with 'main' or 'main()'. I've no idea why,
    and at this point I don't care. This language's syntax seems incredibly
    - you're on eggshells the whole time.

    But I'm just illustrating how someone can have trouble in figuring out
    the syntax of a parameterless function!



    [C was the first language
    I used, several years after A68, where you had to provide the "()" even for
    a parameterless procedure.]

    In the declaration of its header or in a call?

    For calls, I allowed F instead of F() myself for many years, but
    eventually required only F(). 'F' by itself was more useful in providing
    a reference to the function, instead of the untidy '&F' or '^F'.

    As I mentioned elsewhere, allowing both can also cause problems; suppose
    that F itself returns a function, then you can do this:

    F()() # call F then call what it returns

    But if F can be used by itself, then what is this doing:

    F()

    Is that () being applied to F itself, or what it returns after the
    implicit call?

    I guess Algol68 has its own rules for this, but for users in general,
    mixing implicit and explicit calls can give ruse to confusion.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Fri Nov 7 16:50:17 2025
    From Newsgroup: comp.lang.misc

    On 07/11/2025 15:42, bart wrote:
    I almost certainly tried that, and it probably gave errors for
    other reasons. For example, this fails:>   PROC main = VOID: print("hello");
      main()

    Of course it does. "main" returns no value, yet you're
    trying to subscript/parametrise/call that value.

    So then you try something else. [...]

    Or you look at the syntax rules instead of floundering
    around trying random combinations of parentheses?
    But I'm just illustrating how someone can have trouble in figuring
    out the syntax of a parameterless function!
    PROC f = VOID: whatever;
    PROC g = INT: whichever;
    ...
    f;
    print (g);
    ...

    What could be simpler?
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Hertel
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Fri Nov 7 17:59:36 2025
    From Newsgroup: comp.lang.misc

    On 07.11.2025 16:42, bart wrote:
    On 07/11/2025 14:34, Andy Walker wrote:
    On 06/11/2025 17:58, bart wrote:
    I wonder if anyone has ever thought of producing a 'cheatsheet' which
    summarises the essentials on one or two pages?

    Both the A68-R "User's Guide" and the Watt-Peck-Sintzoff one-page
    syntax chart have been referred to here within the past few weeks.

    Here is that example:
    PROC fred = (INT a)INT: 1234;
    print(fred())
    (BTW it takes a parameter because I couldn't figure out how to write an
    empty parameter list.

    You couldn't figure out that to write an empty list you write
    absolutely nothing, as in Algol 60, Pascal, ...?

    I almost certainly tried that, and it probably gave errors for other
    reasons.

    Probably no one told you yet; it helps to learn the language *before*
    you try to use it!

    Guessing syntax and semantics is not an appropriate method, believe me.

    For example, this fails:

    PROC main = VOID: print("hello");
    main()

    with:

    a68: syntax error: 1: VOID construct must yield a routine, row or structured value (detected in particular-program).

    Strangely, if I write this code, I get the message:

    a68: syntax error: 1: You stupid moron this is not C, get an
    Algol 68 textbook before trying to write Algol 68 programs!

    (Indeed I think that error messages could be much more clear.)


    So then you try something else. I didn't know then that that main() was
    at fault.

    This is one of the most basic things you will learn if you consult
    a book. (In my old textbook it's under the chapter "Procedures" the
    first sub-chapter "Procedures without parameters", it comes before
    "Procedures with parameters".)

    Have you ever read an Algol textbook?
    Have you refreshed your knowledge (in case it's necessary)?

    It's beyond me what makes you comment on things you absolutely don't
    know (and obviously also aren't really interested in; otherwise I'd
    expect you'd inform yourself).

    Yet, this works (or worked when I posted about what seemed to
    be the rules for ()):

    PROC main = ()VOID: print("hello");
    main()

    I tried it just now, and it doesn't work with either 'main' or 'main()':

    a68: syntax error: 1: possibly a missing or erroneous symbol nearby.
    a68: syntax error: 2: possibly a missing or erroneous separator nearby.

    However yesterdays' test had a function that returned a value, like this:

    PROC main = ()INT: (print("hello"); 0);
    main()

    Now, that works, and it works with 'main' or 'main()'. I've no idea why,
    and at this point I don't care. This language's syntax seems incredibly
    - you're on eggshells the whole time.

    But I'm just illustrating how someone can have trouble in figuring out
    the syntax of a parameterless function!

    (Not "someone". That's specifically just you!) Syntax is nothing
    to be guessed or "figured out", it's something you have to *learn*!

    Why are you so persistently unwilling to get a book and _learn_
    a language that you obviously don't know (and don't understand)?

    What you've experienced above - not sure you actually grasped it -
    was
    (a) inferring syntax from a completely different language won't
    help you write programs here, and,
    (b) trial and error placing characters arbitrarily is not a good
    way to learn and understand a language.

    I will give you another honest suggestion (that you may also ignore
    if you prefer); if you're unwilling to read textbooks _search_ for
    _examples_ of functional Algol 68 code on the Internet. Or just look
    at the _example code_ from any documentation (like Marcel's PDF).
    Thereby you won't learn and understand all the language but it's a
    fast way to see how e.g. parameter-less procedures (or other things)
    are written. It's not a perfect way, but with that approach a mental
    image of the language might eventually establish in your mind that
    you could use to your advantage. (The problem I see, though, is that
    you might mix and confuse this mental image with your images of
    other programming languages or your imagined alternative personal
    syntax preferences.) You'll have to judge yourself whether that's
    an appropriate replacement of the consequent learning; but it's a
    potential possibility.

    BTW; Usenet can help you but is also no replacement for a textbook.

    Janis

    PS: Please open an own thread with an own more appropriate subject
    line.

    [...]

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Fri Nov 7 18:39:50 2025
    From Newsgroup: comp.lang.misc

    On 07/11/2025 16:59, Janis Papanagnou wrote:
    On 07.11.2025 16:42, bart wrote:

    Strangely, if I write this code, I get the message:

    a68: syntax error: 1: You stupid moron this is not C, get an
    Algol 68 textbook before trying to write Algol 68 programs!
    Well, I now know exactly what YOU are.



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Fri Nov 7 19:49:57 2025
    From Newsgroup: comp.lang.misc

    On 07/11/2025 16:50, Andy Walker wrote:
    On 07/11/2025 15:42, bart wrote:
    I almost certainly tried that, and it probably gave errors for
    other reasons. For example, this fails:>    PROC main = VOID:
    print("hello");
       main()

        Of course it does.  "main" returns no value, yet you're
    trying to subscript/parametrise/call that value.

    So what's happening here:

    PROC main = ()INT: (print("hello"); 0);
    main

    PROC main = ()INT: (print("hello"); 0);
    main()

    main returns 0 in both cases. Both work. But what is being subscripted, parameterised or called in that second example?

    It can't be that zero, since '0()' generates an error. (But funnily
    enough, 'VOID()' is fine!)

    Are these examples actually returning anonymous functions, but in the
    first example it is 'proceduring' the result (implicitly calling it)?

    If this is the case, then it is a strikingly bad bit of design.

    (My experiment below suggests this is the case.)


    So then you try something else. [...]

        Or you look at the syntax rules instead of floundering
    around trying random combinations of parentheses?
    But I'm just illustrating how someone can have trouble in figuring
    out the syntax of a parameterless function!
      PROC f = VOID: whatever;
      PROC g = INT: whichever;
      ...
      f;
      print (g);
      ...

    What could be simpler?

    Well, KNOWING which of a dozen viable incantations it might be is
    obviously simplest.

    If you mean which syntax might be simpler, then probably mine is for a
    start, and there the calls are consistent in all using (), since you
    might recall this was about orthogonality. So, in Algol68, a function
    called with N arguments is written F(...), /except/ when N is zero,
    unless you accidentally create a lambda function.

    This is one of your examples, but with () added to it:

    PROC g = ()INT: 1234;
    print(g)

    It still apparently works. So let's try this:

    MODE IFUNC = PROC INT;
    INT n:=0;

    PROC g = INT: (n+:=1; 1234);
    IFUNC x = g;

    print(x);
    print(x);
    print(x);
    print(n)

    Output is:

    +1234 +1234 +1234 +3

    So, somebody can unwittingly create an anonymous function via a simple
    typo (using () for an empty parameter list by mistake). It looks
    incredibly fragile, and doesn't really stand out either.

    BTW here is that same program in my dynamic language; anonymous
    functions are expressions enclosed in {...}:

    var n:=0

    fun g = {++n; 1234}

    x := g()

    println x()
    println x()
    println x()
    println n

    It's somewhat simpler (no explicit types!), and the use of {...}, which
    is otherwise uncommon, gives a better hint as to what's going on.

    Back to Algol68, then given:

    PROC f = (INT a)INT: ... # regular function with one param
    PROC g = INT: ... # with zero params
    PROC h = ()INT: ... # anonymous function with zero params

    How do you express an anonymous function that takes parameters?




    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Fri Nov 7 20:01:08 2025
    From Newsgroup: comp.lang.misc

    On 07/11/2025 19:49, bart wrote:
    On 07/11/2025 16:50, Andy Walker wrote:

    This is one of your examples, but with () added to it:

        PROC g = ()INT: 1234;
        print(g)

    It still apparently works. So let's try this:

        MODE IFUNC = PROC INT;
        INT n:=0;

        PROC g = INT: (n+:=1; 1234);
        IFUNC x = g;

    This is wrong. 'g' needs '()INT' in order to prove my conjecture that it returns an anonymous function. Here x is just a regular reference to g,
    or an alias, whatever.

    In that case I've no idea how to fix the type of 'x' to make it work.
    THAT is the problem with Algol68, it's too ******* complicated!

    It's the kind of 'complicated' that needs a genuinely simpler language
    not just telling people that they need to go and RTFM.

    Note that the example my language does work with anonymous functions. It
    is far simpler.


    oi

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Fri Nov 7 21:22:39 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 15:58, bart wrote:
    [... H]ere is a quote on the topic from https://cacm.acm.org/blogcacm/niklaus-wirth-or-the-importance-of-being-simple/ :> "Wirth recognized Algol 68 for what it was, a catastrophe."

    The real catastrophe was nothing to do with Algol 68 as a language
    but was the fact that, for fear of being mocked by Wirth and others, newer languages never have a proper formal definition.

    " [... T]o make everything work with everything, you have to complicate
    the compiler to unbelievable extremes, [...]."
    So unbelievable that it was impossible to write a compiler. Oh,
    ... wait .... Why is it more complicated to compile a small number of orthogonal concepts than large number of concepts that interact in odd
    ways with each other?
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Hertel
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@[email protected] to comp.lang.misc on Fri Nov 7 23:13:45 2025
    From Newsgroup: comp.lang.misc

    On Fri, 7 Nov 2025 21:22:39 +0000, Andy Walker wrote:

    The real catastrophe was nothing to do with Algol 68 as a language
    but was the fact that, for fear of being mocked by Wirth and others,
    newer languages never have a proper formal definition.

    I was doing dual undergrad Physics and Comp Sci majors when I came across
    the Algol 68 report. I read it, it blew my mind, but understanding
    something of the limitations of BNF, I appreciated how it was such an
    advance.

    Then I was quite incredulous to discover that many computer scientists rejected that formalism as unnecessary complex and too hard to understand,
    and kept on with the old-school simplistic formal notation plus lots of narrative explanation.

    To me, it was as though physicists had rejected quantum theory as unnecessarily complex and too hard to understand, and insisted on trying
    to describe the world as being based on Newtonian mechanics ...
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Fri Nov 7 23:33:30 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 14:18, bart wrote:
    [...] Read through that Revised Report, which has invented its own language for describing Algol68, and try and tell me how that isn't completely over the top.

    You are conflating the formal definition of a language with the language itself. You are not, and never were, expected to learn A68 from
    the RR unless you have a professional interest in the formal definition of
    A68 [or are a masochist]. Just as you are not expected to learn C from
    the 600+ pages [last time I looked, some years ago] of the Standard.
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Hertel
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Walker@[email protected] to comp.lang.misc on Sat Nov 8 00:26:19 2025
    From Newsgroup: comp.lang.misc

    On 07/11/2025 19:49, bart wrote:
    So what's happening here:

      PROC main = ()INT: (print("hello"); 0);
      main
      PROC main = ()INT: (print("hello"); 0);
      main()

    You do realise that in both cases you are defining "main" to
    return an array of integers?

    main returns 0 in both cases. Both work. [...]

    Because "0" has been coerced to an array of one integer.

    Are these examples actually returning anonymous functions, [...].

    No, of course not.

    So let's try this:
        MODE IFUNC = PROC INT;
        INT n:=0;
        PROC g = INT: (n+:=1; 1234);
        IFUNC x = g;
        print(x);
        print(x);
        print(x);
        print(n)
    Output is:
         +1234      +1234      +1234         +3
    So, somebody can unwittingly create an anonymous function [...].

    ??? It's not anonymous -- you've carefully given "g" a second
    name, "x", via that identity declaration.

    [...]
    Back to Algol68, then given:
       PROC f = (INT a)INT: ...   # regular function with one param
       PROC g = INT: ...          # with zero params
       PROC h = ()INT: ...        # anonymous function with zero params

    It isn't anonymous -- you've called it "h".

    How do you express an anonymous function that takes parameters?
    PROC (INT a) INT: ...

    [I hope we're not going to have further rounds of random insertions of
    assorted brackets in the hopes of discovering some strange phenomenon.
    You seem to have a very weird mental picture of what A68 is!]
    --
    Andy Walker, Nottingham.
    Andy's music pages: www.cuboid.me.uk/andy/Music
    Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Peerson
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Sat Nov 8 01:54:12 2025
    From Newsgroup: comp.lang.misc

    On 08/11/2025 00:26, Andy Walker wrote:
    On 07/11/2025 19:49, bart wrote:
    So what's happening here:

       PROC main = ()INT: (print("hello"); 0);
       main
        PROC main = ()INT: (print("hello"); 0);
       main()

        You do realise that in both cases you are defining "main" to
    return an array of integers?

    Nope, that's news to me. Isn't an array of INT usually written as
    '[]INT'? Sure enough, both of these work:

    PROC f = ()INT: (10,20,30,40);
    PROC g = []INT: (10,20,30,40);

    print(f());
    print(g())

    (And also, indexing can be done as both a[i] and a(i). I never knew
    that. Also that a() returns a, which allows what looks like a function
    to do something quite different.)

    But change f slightly:

    PROC f = (INT a)INT: (10,20,30,40);
    print(f(1))

    And now it's very different. I have to say that this is just as
    spectacular as those empty parentheses suddenly making the return type
    an anonymous function as I'd thought.

    Look also the confusion below. I think, at some point, you have to admit
    some liability in the language if someone with half a century's
    experience has this much trouble understanding what the hell is going on.

    I don't remember this much trouble in other languages I've dabbled in,
    and with those I also work from existing examples or on-line queries or
    from trial and error. I didn't have to study large references tomes to
    get the info I needed.

    This to me is a failing in the language design. It might all make
    perfect sense to a compiler (and even those took some effort) but it has
    to be intuitive to humans too.

    Notice also that, despite the strictness, it gives a lot of freedom, so
    that you type something wrong, but rather than report an error, it just silently enables some other behaviour that you are not aware of. It is fragile.

    main returns 0 in both cases. Both work. [...]

        Because "0" has been coerced to an array of one integer.

    Are these examples actually returning anonymous functions, [...].

        No, of course not.

    So let's try this:      MODE IFUNC = PROC INT;
         INT n:=0;
         PROC g = INT: (n+:=1; 1234);
         IFUNC x = g;
         print(x);
         print(x);
         print(x);
         print(n)
    Output is:
          +1234      +1234      +1234         +3
    So, somebody can unwittingly create an anonymous function [...].

        ???  It's not anonymous -- you've carefully given "g" a second name, "x", via that identity declaration.

    [...]
    Back to Algol68, then given:
        PROC f = (INT a)INT: ...   # regular function with one param
        PROC g = INT: ...          # with zero params
        PROC h = ()INT: ...        # anonymous function with zero params

        It isn't anonymous -- you've called it "h".

    I meant that 'h' returns an anonymous function (and I explained in a
    follow-up that my code was wrong).

    How do you express an anonymous function that takes parameters?
        PROC (INT a) INT: ...

    OK, so is there an anonymous function being passed here:

    t (VOID: count +:= 1);

    The context is some code you posted in 2000, given below (which I came
    across by chance.)

    If it is, then why doesn't it have PROC? And if it isn't, then what /is/
    being passed?

    ---------------------------

    (MODE TAIL = PROC VOID, RULE = PROC (TAIL) VOID;
    STRING input; INT n := 0;
    RULE a = (TAIL q) VOID: ((input [n +:= 1] = "a" | q); n -:= 1),
    b = (TAIL q) VOID: ((input [n +:= 1] = "b" | q); n -:= 1),
    s = (TAIL q) VOID: (a (VOID: s (VOID: s (q))); a (q)),
    t = (TAIL q) VOID: s (VOID: b (q));
    FOR i TO 12 DO INT count := 0;
    input := "aaaaaaaaaaab" [i:];
    t (VOID: count +:= 1);
    print ((count, newline))
    OD)


    You seem to have a very weird mental picture of what A68 is!]

    It's a lot, lot weirder than I remembered from 1980. Then, I thought the
    most complex thing about it was trying to keep track of REFing and
    DEREFing. The compiler might have arcane rules for it, but it is mere
    humans who have to use it.

    So I discarded most of the semantics and kept the bits of syntax I liked.

    I did the right thing.




    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sat Nov 8 03:17:53 2025
    From Newsgroup: comp.lang.misc

    On 08.11.2025 00:13, Lawrence D’Oliveiro wrote:
    On Fri, 7 Nov 2025 21:22:39 +0000, Andy Walker wrote:

    The real catastrophe was nothing to do with Algol 68 as a language
    but was the fact that, for fear of being mocked by Wirth and others,
    newer languages never have a proper formal definition.

    I was doing dual undergrad Physics and Comp Sci majors when I came across the Algol 68 report. I read it, it blew my mind, but understanding
    something of the limitations of BNF, I appreciated how it was such an advance.

    Then I was quite incredulous to discover that many computer scientists rejected that formalism as unnecessary complex and too hard to understand, and kept on with the old-school simplistic formal notation plus lots of narrative explanation.

    To me, it was as though physicists had rejected quantum theory as unnecessarily complex and too hard to understand, and insisted on trying
    to describe the world as being based on Newtonian mechanics ...

    "as though"? - Didn't even Albert Einstein rejected it (for [his]
    reasons and beliefs)! (cf. "Gott würfelt nicht!")

    Concerning "too hard to understand"; the characteristic statement
    can be heard from quantum physicists that if you *think* you've
    understood it completely then it's an indication that you haven't.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From antispam@[email protected] (Waldek Hebisch) to comp.lang.misc on Sat Nov 8 03:50:00 2025
    From Newsgroup: comp.lang.misc

    Andy Walker <[email protected]> wrote:
    On 06/11/2025 15:58, bart wrote:
    [... H]ere is a quote on the topic from
    https://cacm.acm.org/blogcacm/niklaus-wirth-or-the-importance-of-being-simple/ :> "Wirth recognized Algol 68 for what it was, a catastrophe."

    The real catastrophe was nothing to do with Algol 68 as a language
    but was the fact that, for fear of being mocked by Wirth and others, newer languages never have a proper formal definition.

    Algol 68 definition is hard to read and due to this almost useless.
    Now we know better how to give formal definitions. Pascal standard
    give precise and reasonably readible definition of the language
    (even if is is not as formal as you wish). Scheme, SML and
    Haskel claim to have formal definition of semantics, something
    which IIUC Algol 68 did _not_ have.

    To expand a bit, I looked at example van Wijngarden grammar that
    specifies that indentifiers are defined befor use. Trouble is,
    propery specified by this grammar is essentially trivial, but
    the corresponding grammar is not trivial. Modern approach is
    that grammar specifies mapping from strings to trees. Semantic
    properties (and neededing definition before use is a semantic
    property) are defined on trees. And there is notion of
    environment, sematic rules must say what happens to environment.

    Van Wijngarden grammars are heavy and badly adapted to semantic
    properties. And before you use any formalism you first to
    describe it. Formalism used in Pascal definition is lightweight
    and may look as using words in informal way, but in fact crucial
    phrases are precisely defined. Some other languages adapt
    special notation which in itself is more compact than formalism
    from Pascal definition, but precise description of formalism
    probably would make it larger.
    --
    Waldek Hebisch
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@[email protected] to comp.lang.misc on Sat Nov 8 04:47:19 2025
    From Newsgroup: comp.lang.misc

    On Sat, 8 Nov 2025 03:50:00 -0000 (UTC), Waldek Hebisch wrote:

    To expand a bit, I looked at example van Wijngarden grammar that
    specifies that indentifiers are defined befor use. Trouble is,
    propery specified by this grammar is essentially trivial, but
    the corresponding grammar is not trivial.

    Not really, no. The formal grammar is able to specify the fact that an identifier does *not* need to be defined before use; it just needs to be defined *somewhere* that is accessible within the relevant scope. For
    example, two procedures can be mutually recursive; Algol-68 does not
    require Pascal-style (or C-style) forward declarations.

    The only thing that needs to be defined before use is the precedence of a custom operator -- this is to allow the compiler to parse the structure of expressions using that operator. The actual operator definition can be deferred to later.

    And also, the syntax does not allow a struct to directly contain fields of
    its own type, while it *does* allow fields of type pointer to the struct.
    The grammar notation is sophisticated enough to distinguish between the
    two cases. Clever, eh?

    The formal grammar is also able to specify the fact that all declarations
    of identifiers in a block must occur before the first label in that block. This way, there is no need to deal with the question of what happens if a declaration is executed more than once within a block, because there is no
    way for a GOTO to go back to before any declarations within that block.

    Van Wijngarden grammars are heavy and badly adapted to semantic
    properties.

    Do you consider the above properties to be “semantic” or “syntactic”? --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sat Nov 8 11:34:55 2025
    From Newsgroup: comp.lang.misc

    On 08.11.2025 04:50, Waldek Hebisch wrote:
    Andy Walker <[email protected]> wrote:

    The real catastrophe was nothing to do with Algol 68 as a language
    but was the fact that, for fear of being mocked by Wirth and others, newer >> languages never have a proper formal definition.

    Algol 68 definition is hard to read and due to this almost useless.

    Whether things are useful or useless lies usually in the eye of the
    beholder.

    Now we know better how to give formal definitions. Pascal standard
    give precise and reasonably readible definition of the language
    (even if is is not as formal as you wish). Scheme, SML and
    Haskel claim to have formal definition of semantics, something
    which IIUC Algol 68 did _not_ have.

    I can't tell about all [the formal definitions of] the languages you
    enumerate here. For Pascal we certainly cannot compare with Algol 68;
    Pascal is a comparably very simple language. In Algol, for example,
    you can define semantics of expressions by own operator definitions
    and operator _priority_ definitions, which affects the syntax tree.
    If you don't allow for that things get simpler but not necessarily
    better; e.g. C++ has also support for user defined operators, but (as
    opposed to Algol 68) with fixed priorities. This has consequences;
    one, you don't need a 2-level grammar like van Wijngaarden's grammar,
    but then you also buy strange syntax requirements like, e.g., in the
    precedence of the '<<' output operator, that may make it necessary
    to put parenthesis around printed expressions.

    I see that Lawrence provided yet more facts on that useful to know.

    Janis

    [...]

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Sat Nov 8 12:24:41 2025
    From Newsgroup: comp.lang.misc

    On 06/11/2025 22:01, bart wrote:
    On 06/11/2025 18:41, Janis Papanagnou wrote:
    On 06.11.2025 17:14, David Brown wrote:



    * Identifiers must be lower case (I'd always thought it was case-
        insensitive)

    Regarding the above point, I'd be delighted to be pointed to a reference that states it categorically.

    But I suspect it depends on the stropping scheme used. For A68G, I had assumed that all-caps were reserved words, with mixed-case and lower
    case being identifiers. But mixed-case can't work if "OneTwo" is four tokens.

    In 'Learning Algol 68 Genie', it covers this in 2.5 p 15:

    "An identifier is a sequence of one or more characters which starts
    with a lower-case letter and continues with lower-case letters or digits:"

    However, that is at the tail-end of this paragraph:

    "A mode-indicant can be used as a formal-declarer. The formal-declarer
    cannot be
    VOID. The difference between a formal-declarer and an actual-declarer
    will be explained
    in chapter 3. An identifier is a sequence of one or more characters
    which starts
    with a lower-case letter and continues with lower-case letters or digits:"

    You have to wade through that irrelevant crap to get to it. Skimming
    through the rest, it seems you can't really get away from that stuff.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Sat Nov 8 12:42:21 2025
    From Newsgroup: comp.lang.misc

    On 08/11/2025 04:47, Lawrence D’Oliveiro wrote:
    On Sat, 8 Nov 2025 03:50:00 -0000 (UTC), Waldek Hebisch wrote:

    To expand a bit, I looked at example van Wijngarden grammar that
    specifies that indentifiers are defined befor use. Trouble is,
    propery specified by this grammar is essentially trivial, but
    the corresponding grammar is not trivial.

    Not really, no. The formal grammar is able to specify the fact that an identifier does *not* need to be defined before use; it just needs to be defined *somewhere* that is accessible within the relevant scope. For example, two procedures can be mutually recursive; Algol-68 does not
    require Pascal-style (or C-style) forward declarations.

    The only thing that needs to be defined before use is the precedence of a custom operator -- this is to allow the compiler to parse the structure of expressions using that operator. The actual operator definition can be deferred to later.

    That doesn't seem to be the case with A68G; the following program fails, unless the declarations are moved to the top:

    PROC main = VOID: BEGIN
    a := 10;
    b := 20;

    print(a + b);

    INT a, b;
    SKIP
    END;

    main

    OTOH, my language does support out-of-order declarations for everything;
    this program is fine:

    proc main =
    a := 10
    b := 20

    print a + b

    int a, b
    end

    And also, the syntax does not allow a struct to directly contain fields of its own type, while it *does* allow fields of type pointer to the struct.
    The grammar notation is sophisticated enough to distinguish between the
    two cases. Clever, eh?

    Well, so what? That check has to be done somewhere; it's just moved from
    the compiler to some much more elaborate alternative.

    If I try it in mine:

    record R =
    R x
    end

    it reports: 'Recursive record?'. Note it may not directly refer to
    itself, but via a circular chain of references.



    The formal grammar is also able to specify the fact that all declarations
    of identifiers in a block must occur before the first label in that block. This way, there is no need to deal with the question of what happens if a declaration is executed more than once within a block, because there is no way for a GOTO to go back to before any declarations within that block.

    Van Wijngarden grammars are heavy and badly adapted to semantic
    properties.

    Do you consider the above properties to be “semantic” or “syntactic”?

    So why hasn't it been used for many more languages?

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@[email protected] to comp.lang.misc on Sat Nov 8 14:00:08 2025
    From Newsgroup: comp.lang.misc

    On 08.11.2025 02:54, bart wrote:
    On 08/11/2025 00:26, Andy Walker wrote:
    [...]

    PROC f = ()INT: (10,20,30,40);

    [...]

    But change f slightly:

    PROC f = (INT a)INT: (10,20,30,40);
    print(f(1))

    This is no slight change, this is just a blatant error. (What did
    you suppose that should mean?!)


    And now it's very different. [...]

    Another construct, another meaning - or just an error.


    Look also the confusion below. I think, at some point, you have to admit
    some liability in the language if someone with half a century's
    experience has this much trouble understanding what the hell is going on.

    No. You randomly place parenthesis instead of having a specific task,
    use the appropriate clean language concepts, and be satisfied how
    simple it actually is (if following a [decent] software developer's
    way). Your "half a century's experience" is obviously worth nothing
    as you proudly and continuously demonstrated.


    I don't remember this much trouble in other languages I've dabbled in,
    and with those I also work from existing examples or on-line queries or
    from trial and error. I didn't have to study large references tomes to
    get the info I needed.

    This to me is a failing in the language design. It might all make
    perfect sense to a compiler (and even those took some effort) but it has
    to be intuitive to humans too.

    It makes perfectly sense to programmers who learned the basics of the
    language (as thousands of people have done). Don't blame the language
    for your ignorance and unwillingness to learn it before using it.


    Notice also that, despite the strictness, it gives a lot of freedom, so
    that you type something wrong, but rather than report an error, it just silently enables some other behaviour that you are not aware of. It is fragile.

    As opposed to many commonly used other languages you have here a very
    clean syntax and coupling of syntax to semantics, and clean concepts.
    That makes it easy - for programmers who learned the language [before
    they used it]! - to write correct programs and in case of accidental
    errors also get these fixed quickly!

    [...]
    [...]
    You seem to have a very weird mental picture of what A68 is!]

    It's a lot, lot weirder than I remembered from 1980. [...]

    That's why I preventively hinted and suggested in a former post to
    refresh your knowledge(?) when trying to get into it (and obviously
    don't even remember the most basic things).

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bart@[email protected] to comp.lang.misc on Sat Nov 8 15:24:13 2025
    From Newsgroup: comp.lang.misc

    On 08/11/2025 13:00, Janis Papanagnou wrote:
    On 08.11.2025 02:54, bart wrote:

    This to me is a failing in the language design. It might all make
    perfect sense to a compiler (and even those took some effort) but it has
    to be intuitive to humans too.

    It makes perfectly sense to programmers who learned the basics of the language (as thousands of people have done). Don't blame the language
    for your ignorance and unwillingness to learn it before using it.

    Have you asked them? What is sensible about arrays being indexed as both
    A[i] and A(i), rather than choosing one?

    How many of those programmers actually know that ()INT and A(i) can be
    used? Of those that don't, what do you think they will assume from
    seeing F(x, y) in some progam?

    Here's one more: what value does the expression `1 + 2 * 3` yield in
    Algol-68? Assume that + and * have the usual meanings.


    --- Synchronet 3.21a-Linux NewsLink 1.2