🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3397

Re: How to eliminate GOTO?

#3397
From: Marino Ladavac
Date: Mon, 04 Sep 1995 13:52
42 lines
2609 bytes
Ed Chen (edchen@vitec.com) wrote:
: 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.

Pray tell how should one prefix a variable of opaque type.  pthread_t
comes to mind.  Or size_t, or time_t, or practically any other usefull
type.  These are not guaranteed to remain the same forever.  Some of 
them are not guaranteed to/not-to be implemented as objects/pointers.

In this case, IMHO, variable name prefixing can be much more misleading
than you think.  Not all people work exclusively in domain of int/long/
char/float/double's and pointers to them.

/Alby

--
._______V_______.  Dipl.-Ing. Marino Ladavac    (marino.ladavac@aut.alcatel.at)
| A L C A T E L |           Systems Engineer    Network Management Applications
+---------------+  Alcatel Austria AG.   Scheydgasse 41.   1211 Wien.   Austria
                                Tel:(+43 1) 27722 3769    Fax:(+43 1) 27722 171
Technical Details
Message-ID: <42f0aj$c50@atusks02.aut.alcatel.at>
Path: arc1-ca.pugleaf.net!news.aut.alcatel.at!atusc75!ladavac
References: <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <1995Aug29.230015.24358@lorelei.approve.se> <DE5IsK.27z@vitec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.aut.alcatel.at!atusc75!ladavac
From: ladavac@aut.alcatel.at (Marino Ladavac)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: How to eliminate GOTO?
Date: 4 Sep 1995 13:52:19 GMT
Organization: Alcatel Austria AG
Message-ID: <42f0aj$c50@atusks02.aut.alcatel.at>
References: <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <1995Aug29.230015.24358@lorelei.approve.se> <DE5IsK.27z@vitec.com>
NNTP-Posting-Host: atusc75.aut.alcatel.at
X-Newsreader: TIN [version 1.2 PL2]