Groups | Search | Server Info | Login | Register


Groups > comp.lang.misc > #11596

Re: Removing influences from a language

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.lang.misc
Subject Re: Removing influences from a language
Date 2025-11-10 09:14 +0100
Organization A noiseless patient Spider
Message-ID <10es6su$3rf3r$2@dont-email.me> (permalink)
References (6 earlier) <10er8f7$3kmsv$1@dont-email.me> <10erd74$3ljha$1@dont-email.me> <10erdir$3lupj$2@dont-email.me> <10ere59$3ljha$2@dont-email.me> <10erng6$3o93c$1@dont-email.me>

Show all headers | View raw


On 10/11/2025 04:51, Lawrence D’Oliveiro wrote:
> On Mon, 10 Nov 2025 01:12:10 +0000, bart wrote:
> 
>> I also have a small problem with all those trailing commas.
> 
> I don’t. I use them to indicate that there’s nothing special about the
> last item in the list, you can add more after that if you want. This
> is usually the case in high-level languages.
> 

Trailing commas also make such tables and lists easier to maintain.  You 
can cut, copy and paste more easily, and adding new items only affects 
the new lines - it does not mean changing existing lines.  In a world of 
git, svn, and other version control software, it is a significant 
advantage if changes to code only affect the lines that have a 
meaningful change.


> In C code, on the other hand, the last item in an array is often a
> sentinel to indicate the end of the list, e.g.
> 
>      static PyMethodDef discipline_methods[] =
>        {
>          {"makedict", discipline_makedict, METH_VARARGS,
>              "makedict(«tuple of pairs», «message»)\n\n"
>              "displays a message and makes a dictionary from a tuple"
>              " of (key, value) pairs. Raises a ValueError exception if"
>              " any key or value is ExceptMe."
>          },
>          {"factorize", discipline_factorize, METH_VARARGS,
>              "factorize(«n»)\n\n"
>              "returns a tuple of integer pairs («i», «r») representing the"
>              "prime factors of positive integer «n», where «i» is a prime"
>              " number and «r» is the number of times «i» occurs as a factor"
>              " of «n». Raises a ValueError exception if any «i» or «r» equals 5."
>          },
>          END_STRUCT_LIST
>        };
> 
> That lack of a comma means you shouldn’t be adding anything after that
> last item.

Fair enough.

Back to comp.lang.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Removing influences from a language bart <bc@freeuk.com> - 2025-11-08 16:16 +0000
  Re: Removing influences from a language Mikko <mikko.levanto@iki.fi> - 2025-11-09 12:30 +0200
    Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-09 12:22 +0100
      Re: Removing influences from a language "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2025-11-09 14:20 +0100
      Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-09 14:09 +0000
        Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-09 15:40 +0100
          Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-09 15:17 +0000
            Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-09 17:42 +0100
              Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-09 20:07 +0000
              Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-02 02:32 +0000
            Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-09 23:35 +0000
              Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-10 00:56 +0000
                Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-10 01:02 +0000
                Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-10 01:12 +0000
                Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-10 03:51 +0000
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-10 09:14 +0100
                Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-10 11:00 +0000
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-10 14:13 +0100
                Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-10 16:20 +0000
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-10 17:33 +0100
                Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-10 21:01 +0000
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2025-11-11 12:33 +0100
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-02 03:13 +0000
                Re: Removing influences from a language Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-11 12:59 +0100
                Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-11 15:08 +0000
                Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-11 20:44 +0000
                Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-11 23:16 +0000
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-02 03:09 +0000
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2026-02-02 11:32 +0100
                Re: Removing influences from a language Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-02-02 16:32 +0100
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-08 15:52 +0000
                Re: Removing influences from a language Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-02-08 17:51 +0100
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-09 16:58 +0000
                Re: Removing influences from a language ram@zedat.fu-berlin.de (Stefan Ram) - 2026-02-09 18:01 +0000
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-09 23:44 +0000
                Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-10 06:41 +0000
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-10 14:40 +0000
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-09 23:40 +0000
                Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-05 19:49 +0000
                Re: Removing influences from a language ram@zedat.fu-berlin.de (Stefan Ram) - 2026-02-06 03:01 +0000
                Re: Removing influences from a language ram@zedat.fu-berlin.de (Stefan Ram) - 2026-02-11 12:07 +0000
                Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-11 22:44 +0000
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2026-02-12 16:56 +0100
                Re: Removing influences from a language Michael S <already5chosen@yahoo.com> - 2026-02-08 11:01 +0200
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2026-02-08 14:37 +0100
                Re: Removing influences from a language Michael S <already5chosen@yahoo.com> - 2026-02-08 15:57 +0200
                Re: Removing influences from a language David Brown <david.brown@hesbynett.no> - 2026-02-08 16:34 +0100
              Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-02 02:39 +0000
          Re: Removing influences from a language Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-02-02 02:07 +0000
    Re: Removing influences from a language Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-09 20:59 +0000
  Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-13 17:16 +0000
  Re: Removing influences from a language bart <bc@freeuk.com> - 2025-11-13 22:39 +0000

csiph-web