home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!stanford.edu!nntp.Stanford.EDU!dkeisen
- From: dkeisen@leland.Stanford.EDU (Dave Eisen)
- Subject: Re: Function definition style
- Message-ID: <1992Dec31.054359.13226@leland.Stanford.EDU>
- Sender: ?@leland.Stanford.EDU
- Organization: Sequoia Peripherals, Inc.
- Date: Thu, 31 Dec 92 05:43:59 GMT
- Lines: 27
-
- >>I try to use the style in ansi k&r, but I notice that others are using this
- >>style and I assume they aren't all using pre-ansi compilers.
- >
- >IMHO, one should be *very* careful in picking up coding habits from other
- >programmers. Often a programmer will use a particular feature or style
- >out of laziness or ignorance of superior alternatives.
-
- Or for other perfectly valid reasons like portability. There
- are still a fair number of folks left who use compilers that
- don't understand prototypes.
-
- But Dave's point is valid. You shouldn't use a particular style
- just because other programmers use it --- their needs may be
- different from yours so they may have chosen their style for
- reasons that don't apply to you. In this case, using prototypes
- is such a big win over using C Classic function definitions that
- unless portability to pre-ANSI compilers is a major design goal
- of your project, you should use the ANSI style of function
- definition.
-
-
-
- --
- Dave Eisen Sequoia Peripherals: (415) 967-5644
- dkeisen@leland.Stanford.EDU Home: (415) 321-5154
- There's something in my library to offend everybody.
- --- Washington Coalition Against Censorship
-