Article View: comp.std.c
Article #3391Re: How to eliminate GOTO?
From: Ed Chen
Date: Thu, 31 Aug 1995 01:29
Date: Thu, 31 Aug 1995 01:29
24 lines
1733 bytes
1733 bytes
Goran Larsson writes
: > int ISomefunction(int iSomeArg)
: > {
: > int iRetVal = 0;
: ^
: Why are you trying to make C look like FORTRAN?
: What a crazy world - some programmers try to hide data types to make
: updates easier - some try to encode data types in variable names and
: function names to make updates a nightmare...
The intention is not to make updates a nightmare but to avoid problems
when several programmers are working together. Knowing the argument
types a function needs and the type of variables you are using to invoke
the function is important. You could also debug faster (e.g. piTest = piFirst;
is functionally ok as it assigns a pointer to another of the same kind).
In addition, it helps users avoid mistakes like Test.a when Test->a
is required (use pTest->a, the p should be in front of the variable in
order to use ->).
If a variable is changed to another type, a simple global/local change doesn't
cause too much trouble as most editors nowdays can do it automatically. I
believe it helps more than what you think. You certainly don't have to follow
any variable naming convention but please don't critize people who do.
Technical Details
Message-ID:
<DE5IsK.27z@vitec.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!psinntp!psinntp!psinntp!psinntp!nowhere!edchenReferences:
<41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <1995Aug29.230015.24358@lorelei.approve.se>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.lang.c Path: arc1-ca.pugleaf.net!in1.uu.net!psinntp!psinntp!psinntp!psinntp!nowhere!edchen From: edchen@vitec.com (Ed Chen) Subject: Re: How to eliminate GOTO? Message-ID: <DE5IsK.27z@vitec.com> Followup-To: comp.std.c,comp.lang.c Sender: usenet@vitec.com Nntp-Posting-Host: 192.9.201.24 Organization: VITec X-Newsreader: TIN [version 1.2 PL2] References: <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <1995Aug29.230015.24358@lorelei.approve.se> Date: Thu, 31 Aug 1995 01:29:08 GMT