Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!saxony!dgil From: dgil@pa.reuter.COM (Dave Gillett) Newsgroups: comp.lang.apl Subject: Re: Coding Standards Message-ID: <392@saxony.pa.reuter.COM> Date: 6 Sep 90 20:43:42 GMT References: <8703@latcs1.oz.au> Organization: Reuter:file Inc (A Reuter Company) Palo Alto, CA Lines: 20 Two things that I've tended to do, which I think have helped: 1. Devote some lines at the start of the function to verifying the shape/ size/type/number of the arguments, and taking appropriate action (which might be signalling an error, or supplying a default for a missing left argument). Mnemonic labels (eg. 'monadic:' and 'dyadic:') don't hurt. 2. Internal pieces of the package have a preceeding "Hungarian" (see "Programmers at Work") component to their names. Typically something like 'ILF*Log' (where * represents delta); in this case, 'I' is the package (Ipsynch protocol), 'L' is the component (Logging of activity), and 'F' is the type (Function). ILF*Log adds its right argument to the log entry in ILV*Log, and ILF*Write stores it as a file component and resets ILV*Log. If (!) I want code outside the package to be able to store stuff in the package log, I'll add a function with an English name ('Log' perhaps) that passes stuff to ILF*Log. What APL do you use? Have you seen I.P. Sharp's "Logos" environment for associating documentation and change journals with APL code? Dave