Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!bellcore!spectral!sjs From: sjs@spectral.ctt.bellcore.com (Stan Switzer) Newsgroups: comp.lang.c Subject: Re: Implementation-DEPENDENT code (was:strcpy) Message-ID: <6670@bellcore.bellcore.com> Date: 11 Apr 88 14:52:51 GMT References: <7712@apple.Apple.Com> <7485@brl-smoke.ARPA> <10731@mimsy.UUCP> <4331@ihlpf.ATT.COM> <10969@mimsy.UUCP> Sender: news@bellcore.bellcore.com Reply-To: sjs@spectral.UUCP (Stan Switzer) Organization: Computer Technology Transfer, Bellcore Lines: 27 This point bears repeating: > In article <4331@ihlpf.ATT.COM> nevin1@ihlpf.ATT.COM (00704a-Liber) writes: > >The reason that I do not like the proposed change > [to the proposed dpANS to make strcpy(s,s+n) defined] > >is because it ENCOURAGES implementation-dependent code, which, to > >put it simply, is a *bad* programming paradigm. In article <10969@mimsy.UUCP> chris@mimsy.UUCP writes: > Once again, IF THE CHANGE WERE MADE, IT WOULD NOT BE IMPLEMENTATION > DEPENDENT. Thanks, Chris, for a few sane words. I think a few observations can be made about this "tempest-in-a-teapot" 1) Some (most, possibly all) implementations DO implement strcpy left-to-right. (prior-art) 2) It is (occasionally) a useful thing to guarantee. (useful feature) 3) There is a body of code which uses this feature. (do not break existing code) 4) There has been NO example presented where any other order of copying would yield faster code. (efficiency, spirit-of-C) Perhaps the Committee has forgotton its charter? Stan Switzer