Deutsch English Français Italiano |
<vhqn2n$7dc$1@reader2.panix.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail From: cross@spitfire.i.gajendra.net (Dan Cross) Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Command Languages Versus Programming Languages Date: Fri, 22 Nov 2024 19:46:31 -0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <vhqn2n$7dc$1@reader2.panix.com> References: <uu54la$3su5b$6@dont-email.me> <87h67zrtns.fsf@doppelsaurus.mobileactivedefense.com> <vhqkm6$7dv$1@reader2.panix.com> <878qtbrs0o.fsf@doppelsaurus.mobileactivedefense.com> Injection-Date: Fri, 22 Nov 2024 19:46:31 -0000 (UTC) Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80"; logging-data="7596"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross) Bytes: 2572 Lines: 49 In article <878qtbrs0o.fsf@doppelsaurus.mobileactivedefense.com>, Rainer Weikusat <rweikusat@talktalk.net> wrote: >cross@spitfire.i.gajendra.net (Dan Cross) writes: >> Rainer Weikusat <rweikusat@talktalk.net> wrote: >>>cross@spitfire.i.gajendra.net (Dan Cross) writes: >>> >>>[...] >>> >>>> In any event, this seems simpler than what you posted: >>>> >>>> #include <stddef.h> >>>> #include <stdio.h> >>>> #include <stdlib.h> >>>> >>>> int >>>> main(int argc, char *argv[]) >>>> { >>>> if (argc != 2) { >>>> fprintf(stderr, "Usage: matchd <str>\n"); >>>> return EXIT_FAILURE; >>>> } >>>> >>>> for (const char *p = argv[1]; *p != '\0'; p++) >>>> if ('0' <= *p && *p <= '9') >>>> return EXIT_SUCCESS; >>>> >>>> return EXIT_FAILURE; >>>> } >>> >>>It's not only 4 lines longer but in just about every individual aspect >>>syntactically more complicated and more messy and functionally more >>>clumsy. >> >> That's a lot of opinion, and not particularly well-founded >> opinion at that, given that your code was incorrect to begin >> with. > >That's not at all an opinion but an observation. My opinion on this is >that this is either a poor man's attempt at winning an obfuscation >context or - simpler - exemplary bad code. Opinion (noun) a view or judgment formed about something, not necessarily based on fact or knowledge. "I'm writing to voice my opinion on an issue of little importance" You mentioned snark earlier. Physician, heal thyself. - Dan C.