Path: utzoo!attcan!uunet!munnari!bruce!conybear From: conybear@bruce.oz (Roland Conybeare) Newsgroups: comp.sys.mac.programmer Subject: Re: LSC almost gets it right. Message-ID: <526@bruce.oz> Date: 8 Sep 88 02:51:10 GMT References: <5077@fluke.COM> Organization: Comp Sci, Monash Uni, Australia Lines: 35 From article <5077@fluke.COM>, by mce@tc.fluke.COM (Brian McElhinney): > In article <670@mailrus.cc.umich.edu> shane@um.cc.umich.edu (Shane Looker) writes: >>The manual clearly states that the MacTraps calls do not have prototypes. >> >>You can add prototypes with no problem. > > Documenting a bug does not make it a feature (the Require Prototypes option > should *require* prototypes for *all* routines; anything less is a bug). Ahem! My version of LSC (2.01) when told to "require prototypes", complains about all unprototyped calls, *including* toolbox traps. So while I would agree that not providing prototypes for toolbox traps is an omission, I would not call it a bug. While I am firmly seated upon my hobby horse, I wish (Oh, how I wish) that LSC would allow me to prototype either types or declarations, e.g. typedef int (*COMPARE_FN)( float x, float y ); or typedef struct { int (*compare_fn)( float x, float y ); ... } FOO; or { int (*compare_fn)( float x, float y ); } At the moment, once you start using pointers to functions, you lose all of that wonderful prototype checking. Roland Conybeare (conybear@moncsbruce.oz) P.S. and yea verily, doth lint, in its wisdom, deign to check calls to functions, where such calls be made through pointers?