Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.os.linux.misc Subject: Re: OT: Examples for teaching recursion in programming (was: Re: Warning - Serious 'sudo' Flaw Compromises Security) Date: Thu, 16 Oct 2025 15:47:18 -0700 Organization: A noiseless patient Spider Lines: 21 Message-ID: <20251016154718.0000730c@gmail.com> References: <10cdluk$pc59$2@dont-email.me> <1NucnW53DZrMOHH1nZ2dnZfqnPGdnZ2d@giganews.com> <10cihiq$23kb8$6@dont-email.me> <10cios3$25sim$2@dont-email.me> <10cj667$29n96$5@dont-email.me> <10cjf5m$2cnh5$2@dont-email.me> <20251013114536.00000ae5@gmail.com> <10cmkub$39hde$3@dont-email.me> <20251015083926.0000473b@gmail.com> <10cpdjj$1ru9$3@dont-email.me> <10cqcvd$8qkp$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Thu, 16 Oct 2025 22:47:23 +0000 (UTC) Injection-Info: dont-email.me; posting-host="ebed1bf96324a54ae92c26a642501c2e"; logging-data="770744"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184D6S3oOI2UKINumFqIjtVdvK+cjOibq4=" Cancel-Lock: sha1:dpIbOdSHkWwa0Y8oz7DSW+z67Io= X-Newsreader: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Xref: csiph.com comp.os.linux.misc:76269 On Thu, 16 Oct 2025 10:13:17 +0100 Nuno Silva wrote: > >> ... for classroom purposes it'd probably be best to find something > >> with both *A.* practical application in a real-world context ... > >> and *B.* a real case to be made for a recursive solution beyond > >> simple novelty value. > > > > How about parsing JSON and XML, then? They are so heavily used in > > real-world software development these days, it becomes helpful to > > understand how to deal with them. > > That, at least at first sight, appears to be in a different ballpark > for the complexity of the problem that has to be understood. Yeah, it's a puzzler - parsing in general probably *is* a good example of useful applications for recursion, but a lot of the applications themselves are large and hairy enough that you might be hard-pressed to use them as a teaching aid. But then, is there a simpler example that isn't just a toy language...?