Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!otter!kers From: kers@otter.hple.hp.com (Christopher Dollin) Newsgroups: comp.software-eng Subject: Re: Question Re: Configuration Management Message-ID: <3490002@otter.hple.hp.com> Date: 22 Feb 88 09:26:49 GMT References: <497@aimt.UUCP> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 43 "pete@wor-mein.UUCP (Pete Turner)" says (quoting) |> |>None, unless of course the modules are unrelated. For example, wouldn't |>you want the insert, delete, and search functions for a hash table |>implementation in a single file "hash.c" for readability and maintenance? | |No, personally I wouldn't. I would put the files insert.c, delete.c |and search.c (or HS_insert.c, HS_delete.c and HS_search.c) in the directory |"hash". I just don't see any advantage in putting more than one function |in each file. I'd go for "one-datatype-per-file". Spliting the files up using directories is just a hack for controlling a growing namespace; NO existing language that I know of has a decent solution for this (and if *you* know of one that does, **please** let me know!). To counts against splitting in the hash example (and similars): (a) When a developer is given the job of updating the hashing datatype, da[1] must acquire multiple files. Da must update them in lock-step. More potential for confusion arises because the atomicity is too low. (b) The split modules must communicate. Typically this means that they must share *private* header files. That's at least one more file in the system, and this one's not even a real module! And a personal preference: When *I'm* the developer, I prefer my datatypes in files, not the components. The components my be only a few lines long. Splitting them into separate files gives me no benefit; I have to think of filenames for the components. This is especially grocid because the Unix[2] I'm using, HP-UX, is s SysV derivative that is still stuck with 14-character filenames. Now remove two chars for the suffix (that's the MINIMAL suffix, ok). Now remove another two for the ",v" if you're using RCS. Hm. Now remove 4 for the "ved_" prefix (just a random example ...). Hm. What name was that? "comment"? Damn. Regards, Kers | "Why Lisp if you can talk Poperly?"