Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Sebastian Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Command Languages Versus Programming Languages Date: Tue, 6 Aug 2024 08:04:35 -0000 (UTC) Organization: A noiseless patient Spider Lines: 36 Message-ID: References: <87plv6jv1i.fsf@nosuchdomain.example.com> Injection-Date: Tue, 06 Aug 2024 10:04:35 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2b3221f33804ffdf8f9d6189b7fd00a3"; logging-data="1582980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hSbfNNMj1FV+q2QgPLt9zk0s1Pd4Hlok=" User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-18-amd64 (x86_64)) Cancel-Lock: sha1:G7YtM4qDnLWuK6pP+Y9w5QuUf6U= Bytes: 2186 In comp.unix.programmer Stefan Ram wrote: > Janis Papanagnou wrote or quoted: >>On 05.04.2024 01:29, Lawrence D'Oliveiro wrote: >>>This is where indentation helps. E.g. >>> a = >>> b ? >>> c ? d : e >>> : f ? >>> g ? h : i >>> : j; >>> >>Indentation generally helps. > > Let me give it a try to find how I would indent that! > > b? > c? d: e: > f? > g? h: i: > j; > Better: a = b ? (c ? d : e) : f ? (g ? h : i) : j; Equivalent Lisp, for comparison: (setf a (cond (b (if c d e)) (f (if g h i)) (t j))) And some people claim that ternaries are SO horribly unreadable that they should never be used.